M
M
MaxLich2018-11-16 13:43:14
Java
MaxLich, 2018-11-16 13:43:14

How to disable version number increment for related entities when updating the main entity in hibernate?

Hello. There is a main entity and there are several related entities. All have a versionNumber field for the version of the object. If you change something at the main entity, then the version changes not only for the main entity, but for all related ones. Even though they haven't changed at all.
But at the same time, sometimes it is required to change related entities through the main entity. Then, of course, their version must change.
How to make sure that when the main entity changes, the versions of the related ones do not change?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question