gorm-hibernate5 icon indicating copy to clipboard operation
gorm-hibernate5 copied to clipboard

Not allow to modify dateCreated ?

Open abcfy2 opened this issue 4 years ago • 3 comments

Issue link: grails/grails-data-mapping#1249

When GORM version is greater than 6.1.11, will nolonger to change the dateCreated anymore.

I find the reason is:

https://github.com/grails/gorm-hibernate5/blob/408b681658ee24ff13db3b6c20c9ea290756ec3b/grails-datastore-gorm-hibernate5/src/main/groovy/org/grails/orm/hibernate/support/ClosureEventTriggeringInterceptor.java#L205-L208

I don't know why you're not allow to modify dateCreated ?

abcfy2 avatar Aug 21 '19 16:08 abcfy2

I think this is related to this?

https://github.com/grails/gorm-hibernate5/issues/146

codeconsole avatar Aug 25 '19 03:08 codeconsole

Yes, that's true. Since GORM 6.0.11 does not allow to modify dateCreated, and I find the source code. If you changed the dateCreated, it will be dismissed.

abcfy2 avatar Aug 25 '19 05:08 abcfy2