{"action":"created","issue":{"url":"https://api.github.com/repos/gpc/joda-time/issues/28","repository_url":"https://api.github.com/repos/gpc/joda-time","labels_url":"https://api.github.com/repos/gpc/joda-time/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/gpc/joda-time/issues/28/comments","events_url":"https://api.github.com/repos/gpc/joda-time/issues/28/events","html_url":"https://github.com/gpc/joda-time/issues/28","id":348756999,"node_id":"MDU6SXNzdWUzNDg3NTY5OTk=","number":28,"title":"Undocumented configuration change?","user":{"login":"pvangent","id":579684,"node_id":"MDQ6VXNlcjU3OTY4NA==","avatar_url":"https://avatars2.githubusercontent.com/u/579684?v=4","gravatar_id":"","url":"https://api.github.com/users/pvangent","html_url":"https://github.com/pvangent","followers_url":"https://api.github.com/users/pvangent/followers","following_url":"https://api.github.com/users/pvangent/following{/other_user}","gists_url":"https://api.github.com/users/pvangent/gists{/gist_id}","starred_url":"https://api.github.com/users/pvangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvangent/subscriptions","organizations_url":"https://api.github.com/users/pvangent/orgs","repos_url":"https://api.github.com/users/pvangent/repos","events_url":"https://api.github.com/users/pvangent/events{/privacy}","received_events_url":"https://api.github.com/users/pvangent/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-08-08T14:41:34Z","updated_at":"2018-08-09T05:45:54Z","closed_at":null,"author_association":"NONE","body":"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.\r\n\r\nSome facts about the app:\r\n- Grails Version: 3.3.6\r\n- Groovy Version: 2.4.15\r\n- JVM Version: 1.8.0_161\r\n- Hibernate: 5.1.5\r\n\r\nJoda (related) dependencies in build.gradle:\r\n```\r\ncompile 'org.grails.plugins:joda-time:2.1.0'\r\ncompile \"org.jadira.usertype:usertype.jodatime:1.9\"\r\n```\r\n\r\nIn 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:\r\n```\r\ngrails.gorm.default.constraints = {\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentDateTime, class: org.joda.time.DateTime\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentDateTimeZoneAsString, class: org.joda.time.DateTimeZone\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentDurationAsString, class: org.joda.time.Duration\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentInstantAsMillisLong, class: org.joda.time.Instant\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentInterval, class: org.joda.time.Interval\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentLocalDate, class: org.joda.time.LocalDate\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentLocalDateTime, class: org.joda.time.LocalDateTime\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentLocalTime, class: org.joda.time.LocalTime\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentPeriodAsString, class: org.joda.time.Period\r\n    \"user-type\" type: org.jadira.usertype.dateandtime.joda.PersistentYears, class: org.joda.time.Years\r\n}\r\n```\r\n\r\n(To be clear: it works fine in the app, but it seems undocumented - at least for this version of the plugin?)"},"comment":{"url":"https://api.github.com/repos/gpc/joda-time/issues/comments/411643855","html_url":"https://github.com/gpc/joda-time/issues/28#issuecomment-411643855","issue_url":"https://api.github.com/repos/gpc/joda-time/issues/28","id":411643855,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMTY0Mzg1NQ==","user":{"login":"pvangent","id":579684,"node_id":"MDQ6VXNlcjU3OTY4NA==","avatar_url":"https://avatars2.githubusercontent.com/u/579684?v=4","gravatar_id":"","url":"https://api.github.com/users/pvangent","html_url":"https://github.com/pvangent","followers_url":"https://api.github.com/users/pvangent/followers","following_url":"https://api.github.com/users/pvangent/following{/other_user}","gists_url":"https://api.github.com/users/pvangent/gists{/gist_id}","starred_url":"https://api.github.com/users/pvangent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pvangent/subscriptions","organizations_url":"https://api.github.com/users/pvangent/orgs","repos_url":"https://api.github.com/users/pvangent/repos","events_url":"https://api.github.com/users/pvangent/events{/privacy}","received_events_url":"https://api.github.com/users/pvangent/received_events","type":"User","site_admin":false},"created_at":"2018-08-09T05:45:54Z","updated_at":"2018-08-09T05:45:54Z","author_association":"NONE","body":"Right. But doesn't it also require an update of the joda-time/grails-app/commands/grails/plugins/jodatime/InstallJodaTimeGormMappingsCommand.groovy script? "}}
{"actor":{"display_login":"pvangent"}}