-->
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-id and wrapper classes
PostPosted: Wed Mar 21, 2007 1:01 pm 
Newbie

Joined: Mon Mar 12, 2007 12:48 pm
Posts: 3
Hi,

To maintain backwards compatibility and so as I don't have to fix a very broken implementation of an idea, I need to have a composite-id in my hbn file where one of the properties is a Short (as in the wrapper object of a short, not the privative). I don't see how to successfully do this as I can manage to build one with a privative, but I don't see how to apply the property-type attribute, or whatever, to it.

At the moment I have:

<composite-id>
<meta attribute="field-description">Primary key</meta>
<meta attribute="use-in-tostring">true</meta>
<meta attribute="use-in-equals">true</meta>
<key-property name="productRef" type="string" column="PRODUCTREF"/>
<key-property name="containerType" type="short" column="CONTAINERTYPE"/>
</composite-id>

but this just generates the privative.

I have tried searching around and looking through the documentation, but I can't seem to see anything like this.

Many Thanks,

Chris


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 21, 2007 4:23 pm 
Expert
Expert

Joined: Tue Jul 11, 2006 10:21 am
Posts: 457
Location: Columbus, Ohio
Instead of short, specify java.lang.Short.

By the way, how in the world did you misspell primitive three times? The 'v' is like three keys away from 'm'. ;D


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 22, 2007 6:33 am 
Newbie

Joined: Mon Mar 12, 2007 12:48 pm
Posts: 3
Thanks a lot, should really have thought of that myself! With regards to the spelling, I'm blaming careless use of firefox spell checking :)


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.