Hi!
We works with Hibernate 3.3.2. We have an big entity tree. A big part of theese entitys are read only entitys, but thesee are fetched. And if I call a merge it is very slow.
I suppose merge gets the root entity from cache or from db, and sets the detached object properties to the persistent entity tree.
If I set the bidirectional onetomany's other side the updatable=false and insertable=false. So I suppose merge calls merge to all fetched children of root entity.
Child entity @ManyToOne(optional=false) @JoinColumn(name="ID_APPLICATION", referencedColumnName="ID_APPLICATION", nullable=false, updatable=false, insertable=false) public Application getApplication() {
Root entity (Application)
@OneToMany(mappedBy="application") @OrderBy("maturityDate") public java.util.List<RedemptionSchedule> getRedemptionList() {
If I remove the readonly children entitys from detached root entity, than it is more faster, but i'm affraid it's not a beautiful solution.
What is the better solution?
Thanks for all answer!
Hali
|