-
-
Notifications
You must be signed in to change notification settings - Fork 956
Refresh doesn't work for entities which contains hasMany mapping. #14534
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
Comments
Description of issue has been updated. |
@graemerocher in our project we have the same bug with disabled new dirty checking.
I have checked on https://github.com/dmkolpakov/grails-data-mapping-issue-1210 , the bug still exist with hibernateDirtyChecking: true By the way, looks like unnecessary dirty checking during refreshing: |
looks like a big regression. As a workaround (thx @dmkolpakov ) empty method
But in this case, as I understand parent class become non-DirtyCheckable |
don't use
|
I am also facing same problem. |
After upgrade grails to version to 3.3.9 and GORM version to 6.1.10.RELEASE I've got error during refresh any entity which contains mapping like "hasMany".
Similar problem which I've found here is apache/grails-data-mapping#1096, but no solution was provided.
Link to github(test application):
https://github.com/dmkolpakov/grails-data-mapping-issue-1210
Steps for reproduce:
Just run provided application from github repository above in HomeController issue will reproduced.
Please pay attention that I've specified access type for properties for entities in application.groovy.
import javax.persistence.*
grails.gorm.default.mapping = {
'*'(accessType: AccessType.PROPERTY)
}
According my investigation, problem happens because in new version trait DirtyCheckable was added for all domain's entities by default, if we use AccessType.PROPERTY, it invoke setter for certain property and mark entity as dirty, I'm not sure that is right, but more interesting is that hibernate can't proceed with it. I'm going to proceed my investigation, but if you have some thoughts please advise to me.
Exception example:
Task List
Environment Information
The text was updated successfully, but these errors were encountered: