• 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: How to uninsert an EO from EC?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to uninsert an EO from EC?


  • Subject: Re: How to uninsert an EO from EC?
  • From: Marek Wawrzyczny <email@hidden>
  • Date: Tue, 2 Nov 2004 17:14:07 +1100

Just checked :) In this case the scenario:

Three EOs:

Payment:
    -> enrolments, Delete rule: nullify

Student:
    -> enrolments, Delete rule: nullify

Enrolment:
    -> student, Delete rule: nullify
    -> payment, Delete rule: nullify
    -> course, Delete rule: nullify

We manage the deletion of objects manually... the cascade deletion rule scares me in the case of this collection of EOs.


On 02/11/2004, at 15:29, Chuck Hill wrote:

I take it there were no back pointing relationships to the referring
objects with a nullify delete rule?



At 03:08 PM 02/11/2004 +1100, Marek Wawrzyczny wrote:
Thanks for all the replies,

Indeed, ec.deleteObject(eo) works on a new EO, but... make sure nothing
references it, that's where we went wrong.


If you don't explicitly remove the EO from all the relationships you
have added it to, it is still saved to the database. And it seems that
the only reliable way to remove the object from relationships is by
using the removeObjectFromBothSidesOfRelationshipWithKey(...) function.




On 28/10/2004, at 12:25, Marek Wawrzyczny wrote:

Hi,

How does one correctly remove/forget/discard/kill/obliterate a new,
uncommitted EO from an editing context? The EOEditingContext methods
seem to be designed for EOs that have already been committed to the
database.

I have never been able to find the correct way to do this without
resorting to a combination of calls to EC forgetObject(...) and
deleteObject(...), removal of any references through relationships,
etc... and every now and then end up creating the EO with nulled
relationships anyway in the database when saving the ec.

It all seems like a bit of black magic to me.


Marek Wawrzyczny

software engineer
-------------------------->
ish group pty ltd
http://www.ish.com.au
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden

This email sent to email@hidden


Marek Wawrzyczny

software engineer
-------------------------->
ish group pty ltd
http://www.ish.com.au
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
villag
e.net

This email sent to email@hidden


--

Chuck Hill email@hidden
Global Village Consulting Inc. http://www.global-village.net



Marek Wawrzyczny

software engineer
-------------------------->
ish group pty ltd
http://www.ish.com.au
7 Darghan St Glebe 2037 Australia
phone +61 2 9660 1400   fax +61 2 9660 7400

_______________________________________________
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


  • Follow-Ups:
    • Re: How to uninsert an EO from EC?
      • From: Ben Ketteridge <email@hidden>
References: 
 >Re: How to uninsert an EO from EC? (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: rawRowsForSQL key to uppercase, a bug?
  • Next by Date: Re: rawRowsForSQL key to uppercase, a bug?
  • Previous by thread: Re: How to uninsert an EO from EC?
  • Next by thread: Re: How to uninsert an EO from EC?
  • Index(es):
    • Date
    • Thread