-->
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 from Sequence
PostPosted: Fri Sep 02, 2005 1:48 pm 
Regular
Regular

Joined: Thu Apr 21, 2005 9:05 am
Posts: 50
Location: Boston, U.S
<composite-id>
<key-property name="xy" type="integer" column="col1" />
<key-property name="xyz" type="integer" column="col2" />
</composite-id>

In the above case the value of col1 is required to come from a sequence.
How do i implement it in case of a composite-id?
Any thoughts or suggestions are most welcome.

Hibernate version:
3.0.1
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:

The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject: Re: Composite-id from Sequence
PostPosted: Fri Sep 02, 2005 2:17 pm 
Expert
Expert

Joined: Mon Feb 14, 2005 12:32 pm
Posts: 609
Location: Atlanta, GA - USA
mahikty wrote:
<composite-id>
<key-property name="xy" type="integer" column="col1" />
<key-property name="xyz" type="integer" column="col2" />
</composite-id>

In the above case the value of col1 is required to come from a sequence.
How do i implement it in case of a composite-id?
Any thoughts or suggestions are most welcome.


If col1 comes from a sequence, where is the need for a composite-id since the sequence column itself will be unique ?

_________________
Preston

Please don't forget to give credit if/when you get helpful information.


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.