You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ToOne: This one fails in gorm 4.x branch and 5.x branch. It looks like a incomplete logic in NativeEntryEntityPersister
OneToMany: This one succeeds in gorm 4.x, it fails in 5.x branch.
As it is shown in the test, I assume that a entity with a association where the other end belongsTo should cascade on save. This is what I understood from the 'cascade' help in the docs.
My idea to fix the ToOne is to not only check for empty id but also do the dirty check in the NativeEntryEntityPersister:
For the OneToMany I have currently no idea how to fix it. I just realized that in the NativeEntityPersister is only checking if the PersistentSet is dirty. This is not the case, it's the entry inside the PersistentSet that is dirty.
The text was updated successfully, but these errors were encountered:
Please see the following test for grails-datastore-gorm-test: gist SaveCascadeSpec.groovy
It contains two cases for two relation types:
ToOne
: This one fails in gorm 4.x branch and 5.x branch. It looks like a incomplete logic in NativeEntryEntityPersisterOneToMany
: This one succeeds in gorm 4.x, it fails in 5.x branch.As it is shown in the test, I assume that a entity with a association where the other end
belongsTo
should cascade on save. This is what I understood from the 'cascade' help in the docs.My idea to fix the
ToOne
is to not only check for empty id but also do the dirty check in the NativeEntryEntityPersister:For the
OneToMany
I have currently no idea how to fix it. I just realized that in the NativeEntityPersister is only checking if the PersistentSet is dirty. This is not the case, it's the entry inside the PersistentSet that is dirty.The text was updated successfully, but these errors were encountered: