-->
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 generators
PostPosted: Thu Mar 25, 2004 12:00 pm 
Newbie

Joined: Thu Mar 25, 2004 11:47 am
Posts: 3
Location: FRANCE
I'm a beginner in Hibernate development. I have actually a database shema, with for exemple that type of structure:

a table Order with a composite key:
ORDER_SERIE NUMBER(5) not null, /* change each year: 2001, 2002, 2003...*/
ORDER_NUM NUMBER(10) not null, /* incremental and re-initialized each year to 0*/

a Table Line_Orders with a composite key:
ORDER_SERIE NUMBER(5) not null,
ORDER_NUM NUMBER(10) not null,
LINE_ORDER_NUM NUMBER(5) not null, /* incremental and re-initialized each year to 0*/

I search the best way to write the XML-Mapping.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 2:05 pm 
Pro
Pro

Joined: Tue Aug 26, 2003 1:24 pm
Posts: 213
Location: Richardson, TX
Check this out: http://forum.hibernate.org/viewtopic.php?t=927648

However, the "re-initialized each year to 0" part will have to be done programatically.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 01, 2004 10:18 am 
Newbie

Joined: Thu Mar 25, 2004 11:47 am
Posts: 3
Location: FRANCE
thanks greg,
It seems to be good response to my problem.


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.