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
The Hypersistence Optimizer report suggests adding synchronization methods.
When mapping a bidirectional one-to-many or many-to-many association, you need to synchronize both sides of the association. Without synchronizing both sides, Hibernate cannot guarantee that the association state changes propagate to the database.
More, unsynchronized bidirectional associations can also lead to very subtle bugs that are hard to reproduce. For this reason, it’s best to have two utility methods (e.g., addEntity and removeEntity) on the mappedBy side of the one-to-many or many-to-many associations.
The text was updated successfully, but these errors were encountered:
My understanding is that Spring JPA will wrap Entity Bean manipulation into a 'session transaction' such that it will ensure these updates are ACID. Are you worried about different users manipulating the same entity at the same time? If so, I wouldn't put this at a high priority because Atlas is not a high-transaction system, you have a group of users working on their own assets where it's very rare that there would be any cross-talk between updates.
If you're talking about another context, could you elaborate on the specific use case in question?
This recommendation is marked as critical. It's nice to have and removes critical warnings from the Hypersistent analyzer reults. I made the change already. Pull it in if you see the value.
https://vladmihalcea.com/hypersistence-optimizer/docs/user-guide/#BidirectionalSynchronizationEvent
The Hypersistence Optimizer report suggests adding synchronization methods.
When mapping a bidirectional one-to-many or many-to-many association, you need to synchronize both sides of the association. Without synchronizing both sides, Hibernate cannot guarantee that the association state changes propagate to the database.
More, unsynchronized bidirectional associations can also lead to very subtle bugs that are hard to reproduce. For this reason, it’s best to have two utility methods (e.g., addEntity and removeEntity) on the mappedBy side of the one-to-many or many-to-many associations.
The text was updated successfully, but these errors were encountered: