-->
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: obj ref an unsaved transient instance.
PostPosted: Wed Apr 19, 2006 3:20 pm 
Regular
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


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.