1 package org
.codehaus
.groovy
.grails
.orm
.hibernate
3 * Created by IntelliJ IDEA.
7 * To change this template use File | Settings | File Templates.
9 class OneToOneTests
extends AbstractGrailsHibernateTests
{
11 protected void onSetUp() {
23 static belongsTo = [face: Face]
30 void testPersistAssociation() {
31 def faceClass
= ga
.getDomainClass("Face").clazz
32 def noseClass
= ga
.getDomainClass("Nose").clazz
34 def nose
= noseClass
.newInstance()
35 def face
= faceClass
.newInstance(nose
:nose
)
43 assert face
.save(flush
:true)
47 face
= faceClass
.get(1)
48 nose
= noseClass
.get(1)