-->
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.  [ 2 posts ] 
Author Message
 Post subject: Composite-ID Mapping Causes Object to become Dirty on Read
PostPosted: Fri Sep 16, 2005 1:27 pm 
Newbie

Joined: Tue Sep 13, 2005 6:23 pm
Posts: 9
I have two classes, ComponentType and ProductComponentTemplate that map to the same table. Also, ComponentType is the key/identifier for ProductComponentTemplate.

For some reason, when I map composite-id of ProductComponentTemplate like so:
Code:
<class name="com.nppc.mes.productsupply.productdefinition.ProductComponentTemplate" table="GPMQ.CMPNT_TYPE">

        <composite-id>
           <key-many-to-one
              name="typeReference"
              column="CMPNT_TYP_C"
              class="com.nppc.mes.productsupply.reference.product.ComponentType"/>        
         </composite-id>   
         

    </class>


I get a dirty session when I read ProductComponentTemplate. How do I do the mapping in this case, so that session does not get dirty?

I have mapped other composite-id elements and don't have this issue. The only difference is that the composite-id and class being mapped share the same table.

Seems like I should be defining a COMPONENT here, but not sure how to make that all work.


Top
 Profile  
 
 Post subject: Loading a Bag mapping causes session to become dirty
PostPosted: Fri Sep 16, 2005 3:19 pm 
Newbie

Joined: Tue Sep 13, 2005 6:23 pm
Posts: 9
After doing some more digging, I have determined that its not the id causing me the dirty issue. Its the other mappings. I have some bag mappings, and these are causing the session to get dirty.

Why would reading this type of relationship cause a session to become dirty?


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

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.