Re: [appfuse-user] saving related objects

2009-09-14 Thread measwel
quick update: @OneToOne(cascade=CascadeType.ALL) @JoinColumn(name = "main_adres_id") public Address getAddress() { return address; } does the trick -- View this message in context: http://www.nabble.com/saving-related-objects-tp25440670s2369p25444915.html Sent from the AppFuse - Us

Re: [appfuse-user] saving related objects

2009-09-14 Thread measwel
update: can probably be fixed, setting a cascade type on the mapping. Will look into it tomorrow. -- View this message in context: http://www.nabble.com/saving-related-objects-tp25440670s2369p25444878.html Sent from the AppFuse - User mailing list archive at Nabble.com. ---

Re: [appfuse-user] saving related objects

2009-09-14 Thread measwel
I also think so, but it does not work. I added a mapping from address to company, but it makes no difference. In company: @OneToOne @JoinColumn(name = "main_adres_id") public Address getAddress() { return address; } public void setAddress(Address address) { this.address = addr

Re: [appfuse-user] saving related objects

2009-09-14 Thread Matt Raible
I believe it should be happening automatically. I'd consult the Hibernate documentation/forums for further clarification. Matt On Mon, Sep 14, 2009 at 12:14 PM, measwel wrote: > > My User has a OneToOne mapping to Address. In my form I fill out both User > and Address data and OGNL seems to map

[appfuse-user] saving related objects

2009-09-14 Thread measwel
My User has a OneToOne mapping to Address. In my form I fill out both User and Address data and OGNL seems to map the parameters for both objects. When I save User, I get the exception; a related transient entity nees to be saved before flushing (refering to Address) In general; when saving relat