[RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
[RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
- Subject: [RESOLVED]: Why can't I get <addObjectToBothSidesOfRelationshipWithKey> right?
- From: Baiss Eric Magnusson <email@hidden>
- Date: Wed, 16 Mar 2005 18:42:38 -0800
These are my conclusions after a lot of re-adjustment of the code, I
may be stating them in a less than perfect manner. The application is
working.
I had one special condition that perhaps complicated the issue, when
the Task fired I deleted it from the DB, but I am in the Application at
the time and so have to use a temporary EditingContext, which I create
and then dispose.
1) By changing to <EOUtilties.createAndInsertInstance(ec, "Event")> it
simplified the code.
2) If you do not wish a related EO to always exist and you have a
one-to-one relationship, then you need to have a primary key and a
foreign key for both entities, this seems to be the big issue. Do not
try to use Propagate Primary Key in this case.
3) I used <removeObjectFromBothSidesOfRelationshipWithKey> along with
<addObjectToBothSidesOfRelationshipWithKey>, the former I found to be
necessary when deleting the Task in the Application.
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden