These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Mapping a composite element
PostPosted: Wed Nov 18, 2009 8:59 am 
Newbie

Joined: Mon Jun 15, 2009 5:03 am
Posts: 2
Hey guys!

I have a composite element mapped like so:

Code:
<set name="EstimatedTargetCosts" table="AI_ESTIMATEDTARGETCOSTS">
          <key column="ACTIVITYINSTANCE_ID" />
          <composite-element class="PersistenceLayer.Entities.Maintenance.CompositeElements.TargetCost">
              <property name="Amount" column="AMOUNT" />
              <many-to-one name="Sort"
                           column="TARGETCOSTSORTID"
                           class="PersistenceLayer.Entities.Maintenance.TargetCostSort" />
          </composite-element>
      </set>


When the element that contains the "EstimatedTargetCosts" is loaded NHibernate performs a delete and insert on the AI_ESTIMATEDTARGETCOSTS table for each record that is loaded. This is a huge performance bust and not necessary since nothing is updated.

Can I tell the mapping to not do this? Would cascade be the option to use?

Thanks in advance for any kind of help.
Peter.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.