What's the id generation strategy used in Grails unit test -


i have used default id generation strategy in app (with postgres), , have unique sequence table in db other tables, id has unique in table space.

however, don't have same behavior in unit tests, because have same id in different tables, guess grails use different strategy in test? (a sequence per table?)

thanks

by default grails rollbacks db transactions in unit / integration tests. may explain odd behavior.

you can try make unit tests non transactional explicitly stating in test class.

static transactional = false 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -