• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Inserting/Deleting Records From Within EOGenericRecord
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


References: 
 >Inserting/Deleting Records From Within EOGenericRecord (From: email@hidden)

  • Prev by Date: RE: Scheduling with WOTimer
  • Next by Date: Regarding database connectivity
  • Previous by thread: Re: Inserting/Deleting Records From Within EOGenericRecord
  • Next by thread: Re: Inserting/Deleting Records From Within EOGenericRecord
  • Index(es):
    • Date
    • Thread