-->
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.  [ 3 posts ] 
Author Message
 Post subject: composite-element load probem.
PostPosted: Tue Nov 23, 2004 3:29 am 
Newbie

Joined: Tue Mar 30, 2004 9:58 am
Posts: 8
Location: Chicago, IL
Hello,
I have the following mappings for a composite-element as a list.

<list name="lineItems" table="lineitem" lazy="false">
<key column="orderid"/>
<index column="linenum"/>
<composite-element class="LineItem">
<property name="quantity" column="quantity"/>
<property name="unitPrice" column="unitprice"/>
<many-to-one name="item" column="itemid" cascade="none"/>
</composite-element>
</list>

When I read the Parent class, the children (lineItems) get loaded. But the attribues for the key column (orderid) and the index column (linenum) do not get loaded. (They are always zero-default value for java). All the other properties (like quantity, unitPrice and Item are loaded).

The orderid and linenum form the primary key in the lineitem table.

Any ideas? Any help would be appreciated.

Thanks
Matt

_________________
Matt Madhavan, Consultant


Top
 Profile  
 
 Post subject: Re: composite-element load probem.
PostPosted: Tue Nov 23, 2004 4:28 am 
Beginner
Beginner

Joined: Fri Nov 19, 2004 6:41 am
Posts: 39
Location: Stockholm, Sweden
mattmadhavan wrote:
Hello,
I have the following mappings for a composite-element as a list.

<list name="lineItems" table="lineitem" lazy="false">
<key column="orderid"/>
<index column="linenum"/>
<composite-element class="LineItem">
<property name="quantity" column="quantity"/>
<property name="unitPrice" column="unitprice"/>
<many-to-one name="item" column="itemid" cascade="none"/>
</composite-element>
</list>

When I read the Parent class, the children (lineItems) get loaded. But the attribues for the key column (orderid) and the index column (linenum) do not get loaded. (They are always zero-default value for java). All the other properties (like quantity, unitPrice and Item are loaded).

The orderid and linenum form the primary key in the lineitem table.

Any ideas? Any help would be appreciated.

Thanks
Matt


I'd also like to know!

Regards, Kevin


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 23, 2004 5:34 pm 
Newbie

Joined: Tue Mar 30, 2004 9:58 am
Posts: 8
Location: Chicago, IL
Hi Kevin.
I still have not solved this problem and I reposted this again. Any ideas from you?

Matt

_________________
Matt Madhavan, Consultant


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.