hibernate-orm
                                
                                
                                
                                    hibernate-orm copied to clipboard
                            
                            
                            
                        HHH-14228 Squash update into insert if possible
save unnecessary update statements
https://hibernate.atlassian.net/browse/HHH-14228
It seems better than https://github.com/hibernate/hibernate-orm/pull/3565
seems great idea for optimization. not sure whether there is some unanticipated side effect (which we usually are aware of only after it has been released), though.
Compare to #3567 , this one need call session.update(), which one is better? @NathanQingyangXu
TBH, I am not sure,:). I am not familiar with action queue related stuff. Maybe Beikov knows much better than me.
On Mon., Sep. 28, 2020, 21:20 Yanming Zhou, [email protected] wrote:
Compare to #3567 https://github.com/hibernate/hibernate-orm/pull/3567 , which one is better? @NathanQingyangXu https://github.com/NathanQingyangXu
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hibernate/hibernate-orm/pull/3566#issuecomment-700367836, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6UYARHUQEW7VCP4OVJS3DSIEY6ZANCNFSM4R3MYANA .
TBH, I am not sure,:). I am not familiar with action queue related stuff. Maybe Beikov knows much better than me. … On Mon., Sep. 28, 2020, 21:20 Yanming Zhou, @.***> wrote: Compare to #3567 <#3567> , which one is better? @NathanQingyangXu https://github.com/NathanQingyangXu — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#3566 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB6UYARHUQEW7VCP4OVJS3DSIEY6ZANCNFSM4R3MYANA .
@beikov What do you think?
I don't know much about the ActionQueue, but I think that there might be situations where an update must happen after an insert and the two should not be merged. Your logic completely ignores possible dependencies. I didn't give this much thought yet, but I think there are cases when you first want to write null to a column in an insert and then update the column after some other insert to avoid violating a FK constraint.
I don't know much about the ActionQueue, but I think that there might be situations where an update must happen after an insert and the two should not be merged. Your logic completely ignores possible dependencies. I didn't give this much thought yet, but I think there are cases when you first want to write null to a column in an insert and then update the column after some other insert to avoid violating a FK constraint.
I assume you think this one is better, It left to user, if they want merging then call session.update() or new method session.squash().
BTW, I would highly recommend considering targeting this feature to v6 (wip/v6.0) for v6 is a natural testbed for such new features and @sebersole might provide invaluable feedback on the design. V5 is mainly for maintenance purpose and bug fixing.
BTW, I would highly recommend considering targeting this feature to v6 (
wip/v6.0) for v6 is a natural testbed for such new features and @sebersole might provide invaluable feedback on the design. V5 is mainly for maintenance purpose and bug fixing.
Rebased.
BTW, I would highly recommend considering targeting this feature to v6 (
wip/v6.0) for v6 is a natural testbed for such new features and @sebersole might provide invaluable feedback on the design. V5 is mainly for maintenance purpose and bug fixing.Rebased.
Thanks. Let us see how @sebersole assesses this PR. BTW, the testing package in v6 is org/hibernate/orm/test. It is the testing cases migration target in v6 and CI building is based on it. Also, feel free to make use of new testing infrastructure abstraction in v6 (an example is org.hibernate.orm.test.entitygraph.EntityGraphFunctionalTests in the above package). Good luck!
BTW, I used to doubt whether this fix would break ActionQueue's insert ordering. After manual cloning quaff's repo and running the latest testing cases (due to https://github.com/hibernate/hibernate-orm/pull/3581), I found his fix won't interfere with insert ordering.
@gavinking I'm sorry to disturb you, I assume you are expert of ActionQueque, could you evaluate the value of this feature and review the PR?
I assume you are expert of
ActionQueque
Not anymore, no.