- 
          
- 
                Notifications
    You must be signed in to change notification settings 
- Fork 967
7.0.x AutoTmestamp Enhancements + grails.importGrailsAnnotations GrailsExtension #15118
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
base: 7.1.x
Are you sure you want to change the base?
7.0.x AutoTmestamp Enhancements + grails.importGrailsAnnotations GrailsExtension #15118
Conversation
| // Check for grails-scaffolding (grails.plugin.scaffolding.annotation.*) | ||
| def scaffoldingDep = project.configurations.getByName('compileClasspath').dependencies.find { Dependency d -> | ||
| d.group == 'org.apache.grails' && d.name == 'grails-scaffolding' | ||
| } | ||
| if (scaffoldingDep) { | ||
| starImports.add('grails.plugin.scaffolding.annotation') | ||
| } | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I understand why you added it while at it, this technically does not have anything to do with time.
It should probably be in a subsequent PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbglasius I agree it could of been in a separate PR, but it's kind of a gray area because the added config is importGrailsAnnotations and that is just adding 1 annotation @Scaffold.  Plus there is a lot I want to address and the latency in getting PRs reviewed is a bit slow at the moment for what I want to get added/fixed.
The motivation for this PR is actually for importGrailsAnnotations.    I was originally against
@matrei  's suggest of having 2 different annotations for AutoTimestamp because of the extra import statement on every domain class, but with importGrailsAnnotations, I don't mind.
In fact, with importGrailsAnnotations, I am even willing to get rid of @AutoTimestamp now. @matrei what are your thoughts about getting rid of @AutoTimestamp?
…erties will only be marked dirty if other updates exist. This mimics the behavior in hibernate. Fixes apache#15120
| Per the weekly meeting, we'll merge this into 7.1. The vote to create that branch is going now - once 72 hrs have passed, we'll create the branch. | 
| @codeconsole Can you update this PR now that you've made your mongo update date fixes? | 
… is now handled in the EntityPersister
| 
 Done | 
| I've updated 7.1.x with the latest 7.0.x changes. Can you please merge 7.1.x into this PR so the changes are reflected? | 
Introduce
@CreatedDate,@LastModifiedDate,@CreatedBy, and@LastModifiedBysimilar to Spring DataIntroduce grails.importGrailsCommonAnnotations to automatically import common grails annotations and jakarta.validation.constraints.*
build.gradle
allows the following with no imports