>I really need to test this code before jumping to any conclusions, but
>anyway here is an idea. Is it possible that "address" is not registered in
>context at the moment when it is added to the relationship?
no I created and registered Address see code below.
address = new Address();
ctxt.registerNewObject(address, "Address");
address.updateValues(toAddress);
insMstr.put("address", address);
ctxt.commitChanges();
>I guess we can implement EOF behavior - quietly register any new objects on
>attempts to assign them to relationships. Maybe not very consistent, but
>rather user-friendly.
That would be ideal!
J.R.
-----Original Message-----
From: Andrus [mailto:andru..bjectstyle.org]
Sent: Monday, August 19, 2002 11:19 PM
To: JR Ruggentaler; Cayenne-User (E-mail)
Subject: RE: takeValuesFromDictionary: equvalent
I really need to test this code before jumping to any conclusions, but
anyway here is an idea. Is it possible that "address" is not registered in
context at the moment when it is added to the relationship?
I guess we can implement EOF behavior - quietly register any new objects on
attempts to assign them to relationships. Maybe not very consistent, but
rather user-friendly.
Andrus
At 11:14 PM 8/18/2002 -0500, JR Ruggentaler wrote:
>Andrus,
> thanks for the updateValues() method. I think it would be a good
>addition to the framework. I am having a problem with the relationships.
>After I call updatesValues() and save the changes my relationship does not
>get set in the database. I even tried calling the Entities set (setAddress)
>method and I doesn't make a difference. Here is a small piece of the code
>
>// Plan not found create plan
>if (null == plan)
>{
> plan = new Plan();
> ctxt.registerNewObject(plan, "Plan");
> plan.updateValues(insMstr);
> plan.setAddress(address);
> ctxt.commitChanges();
>}
>
>Is there any reason you can think of why the framework would not save the
>foreign key in the source table?
This archive was generated by hypermail 2.0.0 : Tue Aug 20 2002 - 11:15:22 EDT