You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am busy with a (long overdue) upgrade of a Grails2 app to Grails3. Part of the upgrade is maintaining the Joda Time functionality. This has likely succeeded, but with a configuration that is not documented. I am not sure if the plugin's workings have changed, or the documentation is incorrect, but I think it's worth noting.
In the Grails2 app the Joda <> Hibernate mapping was in a grails.gorm.default.mapping entry in Config.groovy. I moved this to application.groovy, which is the correct place according to this plugin's documentation (and install-mapping script). However, in the Grails3 app grails.gorm.default.mapping does not work. What does work, is using the grails.gorm.default.constraints entry. Like so:
Right. But doesn't it also require an update of the joda-time/grails-app/commands/grails/plugins/jodatime/InstallJodaTimeGormMappingsCommand.groovy script?
The new config grails.gorm.default.constraints worked for a while, until I cleaned the application. After that it would not startup again, with a fatal Hibernate error configuring the datasource. I found some references on the web regarding dependencies between Jadira en Hibernate5.x, and it looks like you should use org.jadira.usertype:usertype.core:5.0.0.GA instead of org.jadira.usertype:usertype.jodatime:1.9. For me it works anyway...
If this is true, that would be another change to the docs I guess?
I am busy with a (long overdue) upgrade of a Grails2 app to Grails3. Part of the upgrade is maintaining the Joda Time functionality. This has likely succeeded, but with a configuration that is not documented. I am not sure if the plugin's workings have changed, or the documentation is incorrect, but I think it's worth noting.
Some facts about the app:
Joda (related) dependencies in build.gradle:
In the Grails2 app the Joda <> Hibernate mapping was in a
grails.gorm.default.mapping
entry in Config.groovy. I moved this to application.groovy, which is the correct place according to this plugin's documentation (and install-mapping script). However, in the Grails3 appgrails.gorm.default.mapping
does not work. What does work, is using thegrails.gorm.default.constraints
entry. Like so:(To be clear: it works fine in the app, but it seems undocumented - at least for this version of the plugin?)
The text was updated successfully, but these errors were encountered: