-->
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 key and XDoclet
PostPosted: Thu Jan 15, 2004 12:36 pm 
Newbie

Joined: Mon Jan 12, 2004 3:25 pm
Posts: 9
How does one specify composite-id thru Xdoclet.
I was sifting thru Xdoclet config and there is not tag for it,
or am I missing something?

Xdoclet 1.2 final is the version I am referring to.

Thanks,
Alex.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jan 15, 2004 2:59 pm 
Newbie

Joined: Mon Jan 12, 2004 3:25 pm
Posts: 9
aaaah XDoclet basically sucks at generating composite-id

I looked it up and it turns out that the composite ids of the form:
<composite-id>
<key-property name="prop1" />
<key-property name="prop2" />
</composite-id>

are impossible to generate. I would have to implement my composite-id as another object that would need to be Serializable and implement equals method.

Anyway I think a merge point for this situation would be nice.

Alex


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 16, 2004 7:27 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 7:19 pm
Posts: 2364
Location: Brisbane, Australia
It is true that embedded composite keys are not supported by Xdoclet but composite keys as a sparate class are. You add the markup to the Key fields.
Using a independent class for the composite class is the recommended approach.


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.