-->
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: the Serial sql type
PostPosted: Wed Jun 23, 2004 3:46 pm 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:03 pm
Posts: 40
how to do this

class SomeClass {

Integer Object object1;

private Collection collection;

}


all objects in collection can be persisted with hibernate. all objects in collection have an id property, which refers to object1's id.

I need to save both object1 and collection; the problem is:

how to should I tell to hibernate, to assign an id to object1, so I can set this id for each element of the collection?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jun 23, 2004 3:46 pm 
Beginner
Beginner

Joined: Thu Apr 29, 2004 4:03 pm
Posts: 40
sorry, there is a mistake:

integer Object object1
should be private Object object1


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.