-->
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: How do I create an object structure in one go
PostPosted: Tue Apr 24, 2007 5:44 am 
Newbie

Joined: Tue Apr 24, 2007 4:47 am
Posts: 4
Hello again,
I solved the problem with debugging, sorry for posting.

save on the person-object works and saves the emailobjects too,
as described below.

Bye Jochen




orignal posting:

Hello,
I try to realize some model similar to the example of the hibernate documentation (person <-> email).

The connection between person and email is realised
in the way, that email contains the attribute person.

My aim is, to create the person-object and programatically
create some new email-objects for that the person-object
and save the complete structure (person and emails)
with one save-command on the person-object.

In other words, a save on the transient person-object should
save the transient email-objects too.


my person.java constructor programatically
creates a set of email-objects,
linking them togetcher with
email.person = this; // this is the transient person-object

But the save command only saves the person-object.

Can I do this?
How can i do this?
Any hints, sugestions or links?

bye jochen


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.