Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support non java.util.Date dateCreated / lastUpdated types #210

Merged
merged 1 commit into from
Jan 10, 2021

Conversation

mattlong-finocomp
Copy link
Contributor

With Grails 4, the java 8 java.time classes can be used for dateCreated / lastUpdated columns on entities.
This plugin assumes java.util.Date (even for autotimestamping) which breaks the ability to use a class such as java.time.Instant for these fields.
This change uses the GORM timestamp provider used to provide this same functionality.

A limitation in this implementation is it assumes that dateCreated and lastUpdated are the same data type. I can't think of a scenario where someone would want to use different data types for those though.

With Grails 4, the java 8 java.time classes can be used for dateCreated / lastUpdated columns on entities.
This plugin assumes java.util.Date (even for autotimestamping) which breaks the ability to use a class such as java.time.Instant for these fields.
This change uses the GORM timestamp provider used to provide this same functionality.
@robertoschwald robertoschwald self-requested a review January 6, 2021 14:22
@robertoschwald
Copy link
Member

Thanks!

@robertoschwald robertoschwald merged commit ac3c86b into symentis:master Jan 10, 2021
Copy link
Member

@robertoschwald robertoschwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants