GRAILS-1019: Allowing expressions to be used with the 'disabled' attribute for g...
[grails.git] / test / tiger / org / codehaus / groovy / grails / orm / hibernate / UnidirectionalOneToManyHibernateMappedTests.groovy
blobad92b8ea24c59587050589fc3d75f45e32370ca0
1 package org.codehaus.groovy.grails.orm.hibernate
4 import org.codehaus.groovy.grails.commons.DefaultGrailsApplication
5 import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
7 /**
8 * @author Graeme Rocher
9 * @since 1.0
11 * Created: Apr 8, 2008
13 class UnidirectionalOneToManyHibernateMappedTests extends GroovyTestCase {
15 void testAnnotatedOneToManyDomain() {
16 def config = new GrailsAnnotationConfiguration()
17 def gcl = new GroovyClassLoader()
18 // a grails entity
19 gcl.parseClass('''
20 class UnidirectionalOneToManyHibernateMapped {
21 Long id
22 Long version
24 ''')
25 DefaultGrailsApplication application = new DefaultGrailsApplication(gcl.loadedClasses, gcl)
26 application.initialise()
27 config.grailsApplication = application
29 config.addAnnotatedClass OneEntity
30 config.addAnnotatedClass ManyEntity
31 config.buildMappings()