Re: saving / addObjectToBothSidesOfRelationshipWithKey
Re: saving / addObjectToBothSidesOfRelationshipWithKey
- Subject: Re: saving / addObjectToBothSidesOfRelationshipWithKey
- From: Art Isbell <email@hidden>
- Date: Fri, 10 Jan 2003 17:32:55 -1000
On Friday, January 10, 2003, at 07:38 AM, Jonathan Fleming wrote:
I keep on getting this problem when I try to save to the database:
The tbAdminUser property of TbClient must have a TbAdminUser assigned
Have you checked in the debugger which TbClient object is failing
validation? Could there be another TbClient object being created and
inserted into the editing context but whose relationships aren't being
assigned?
In the application I am logged in as the user and I can see all my
user details so i know I'm in ok and have a tbAdminUser object.
But you're not making yourself the tbAdminUser property of the new
TbClient, right?
next I create a new form for the tbClient (TbClient entity) this is
done in the constructor with - tbClient = new TbClient();
You must be inserting tbClient into your editing context, right?
public WOComponent addClientAndRelationships() {
setNewClientInRelationship (null /*enables create New Client
button to show the form*/);
Not sure what the above does, but I assume it's unrelated to the
problem.
This code is also suppoosed to be joining the TbClient entity
with the TbClientData Enitity but i can not see if this is correct
because the validation will not let me past the first error (above).
I can't see anything obviously wrong with your code assuming I
understand what you're trying to do.
The form fields, however, are bound by
tbClient.aColumNameFromDatabase
Not sure what the above means.
Art
http://homepage.mac.com/aisbell/
_______________________________________________
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.