-->
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.  [ 1 post ] 
Author Message
 Post subject: Select autoincrement identity
PostPosted: Tue Mar 18, 2008 12:32 pm 
Beginner
Beginner

Joined: Thu Oct 25, 2007 3:45 am
Posts: 22
Hello,

The case looks like this: two classes with mappings:

<class name="Class1" table="Class1">

<id name="Id" type="int">
<column name="Id" />
<generator class="identity"/>
</id>

<!-- One-to-many association with Class2 -->

</class>

<class name="Class2" table="Class2">

<!-- One-to-one association with Class3 -->

</class>

<class name="Class3" table="Class3">

<!-- ... -->

</class>

There is an int property in Class3 which value needs to be equal to the id of Class1. Can it be done with only one operation - save of Class1?
(The One-to-one association of Class2 with Class3 is just example, could be different.)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.