A bit of hibernate optimization
The context Assume you are dealing with a hibernate operation which requires to copy a lot of objects in the database. For instance you are having 2 objects as described in the diagram bellow: budget and entries and you want to duplicate the budget and all it’s entries for some operation. There are several way to do this. Budget - entries First approach In hibernate usual approach this is done most of the time as something similar to:...