Re: Inserting/Deleting Records From Within EOGenericRecord
Re: Inserting/Deleting Records From Within EOGenericRecord
- Subject: Re: Inserting/Deleting Records From Within EOGenericRecord
- From: Giorgio Valoti <email@hidden>
- Date: Wed, 10 Mar 2004 10:35:42 +0100
On 09/mar/04, at 21:52, email@hidden wrote:
I am trying to insert and delete records from within an
EOGenericRecord (or custom classes generated from the db schema of the
EOModel)
First of all is this a good idea ? If its ok, then here is my problem.
When I try to delete a record related to the EOGenericRecord it SEEMS
to have been deleted but its not.
To be specific, Subscriber is the EOGenericRecord and it has a one to
many relationship with Subscription.
(Subscriber<-(toSubscriptions)->>Subscription)
When I delete a subscription from subscriber by doing the following
nothing happens:
this.removeFromToSubscriptions(subscription);
this.removeObjectFromBothSidesOfRelationshipWithKey(subscription,"toSub
scriptions");
IIRC, if you want to delete a subscription object in this scenario you
just call:
this.removeObjectFromBothSidesOfRelationshipWithKey(subscription,"toSubs
criptions");
// then save changes, etc...
Provided that "toSubscriptions" has the owns relationship set to true.
Hope that helps
--
Giorgio Valoti
-------------
_______________________________________________
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.