Regular |
|
Joined: Fri Feb 03, 2006 5:28 pm Posts: 73 Location: Québec, QC, Canada
|
Hi folks,
let's say I have a Client class and an Address class.
A Client has a ShippingAddress property..
In my code I do this:
Client c = new Client();
c.Name = "Client name";
c.Phone = "000-000-0000";
Address a = new Address();
a.Street = "111 main st.";
a.City = "MyCity";
c.BillingAddress = a; // This won't work, it throws a "object references an unsaved transient instance - save the transient instance before flushing: Com.Progmatik.ClickMax.Category"
So I know I have to save the Address before doing so, but I was wondering why NHibernate doesnt do that automatically ?
Is there anything I can do? Anything wrong with this?
Thanks
|
|