Re: Traversing keys or EOEntities
Re: Traversing keys or EOEntities
- Subject: Re: Traversing keys or EOEntities
- From: "Jonathan Fleming" <email@hidden>
- Date: Wed, 12 Feb 2003 20:27:30 +0000
Hi Art or anyone else that can help:
this is the relationship:
tbClient-(owns tbClientData, propagates primary key) > <
(mandatory)-tbClientData
From the code below I am trying to get data to go into the object
tbClientData but I keep getting this error message -- The tbClient property
of TbClientData must have a TbClient assigned -- how do I correctly travers
the keys or EOEntities. By the way the form in the WOBuilder is bound to
tbClients to travers the entities that way but I still get the error
message. I have also tried binding directly to tbClientData as in the code
below (Ps. the tbClient part works and saves to the db just fine. Its
connecting to the linked entity that's the problem):
EOEditingContext ec = session().defaultEditingContext();
TbClient newTbClient = new TbClient();
ec.insertObject(newTbClient);
session.getUser().addObjectToBothSidesOfRelationshipWithKey(newTbClient
, "tbClients");
tbClient = newTbClient;
TbClientData newTbClientData = new TbClientData();
ec.insertObject(newTbClientData);
tbClient.addObjectToBothSidesOfRelationshipWithKey(newTbClientData,
"tbClientData");
Much appreciation
Jonathan
_________________________________________________________________
MSN Messenger - fast, easy and FREE! http://messenger.msn.co.uk
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.