vendredi 27 février 2015

Hibernate LAZY Fetch VS Optimistic Locking version

Sorry if the answer was already response, but I tried to find out the solution and I could not find anything clear yet.


My question is, there´s any relationships between LAZY fetch relationships, which I know they have the control to know if they have to JOIN or not to other entities or initialize from database if they´re dirty on session, with the principle of optimistic locking VERSION?.


As far as I can understand the optimistic locking VERSION is more necessary if we have to handle multiple transactions at the same time. Is that correct?.


If all the transactions that we do in our applications are done sequentially, it is enough use LAZY fetch to manage when JOINS have to being done?. Or add version give us any add of value.


Thanks!


Aucun commentaire:

Enregistrer un commentaire