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
|