How should i handle relationships of unsaved objects?
Let's say i got 2 classes: Person and Address. They are connected with
one-to-one relationship.
Problem is that after creating new object: Person (in normal way):
Person p=new Person(); //not registered in cayenne
after doing that i can't set any relationships (like with the address). (1)
After i register Person p in Cayenne i can set up relationships but only
with registered objects. (2)
Is there any way to do such things? (1)(2)
Or it is supposed to be like that?
I'm testing Hibernate, compering it with Cayenne and i miss Hibernate's
cascade savings.
In Hibernate i create:
Person p=new Person();
p.setAddress=new Address();
(...)
(...).save(p);
and p is saved (with the address)
Is there any way do do such things in Cayenne?
Thank you all,
Mike :)
This archive was generated by hypermail 2.0.0 : Thu Jun 05 2008 - 08:35:17 EDT