« Return to Thread: Where to put def configClass = GrailsAnnotationConfiguration?

RE: Where to put def configClass = GrailsAnnotationConfiguration?

by Burt Beckwith :: Rate this Message:

Reply to Author | View in Thread

Leave out the 'def' - it's configured like dbCreate, url, etc.

Burt

------

I believe the line

def configClass = GrailsAnnotationConfiguration?

needs to go in my DataSource.groovy file, but where?

All the examples I see, show a snippet of code that looks like this:

xxxDataSource.groovy:
import
org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration
class DevelopmentDataSource {
   def configClass = GrailsAnnotationConfiguration.class

...

my DataSource.groovy is straight from grails-1.1.1 and looks like this:

...
environments {
        development {
                dataSource {
                        dbCreate = "create-drop" // one of 'create', 'create-drop','update'
                        url = "jdbc:hsqldb:mem:devDB"
                }
        }
...

I tried putting the configClass in the dataSource closure, but that fails.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: Where to put def configClass = GrailsAnnotationConfiguration?