Is there a way to prevent dirty checking of entities and the deep copy of components?
Here some background:
We are using hibernate for a specific implementation of a 2-dimensional historization framework. The framework takes over responsibility for - dirty checking, i.e. the framework knows when an entity has been changed and when it's new - assigning ids, i.e. we are assigning a new composite id before a new entity is saved.
In the the end, all entities that remain in the session when it is flushed are - either new and added to the session by 'save' - or dirty and added to the session by 'update'. - all other entities that were loaded are removed from the session by 'evict'.
As a consequence we do not need any dirty check and consequently no deep copy of any entities, properties and especially not of certain component properties, not during loading nor during saving. Also comparing of such properties is not required.
Of course everything works fine with dirty checking, but it is very time consuming, especially since many calendar field are envolved.
|