Re: How to uninsert an EO from EC?
Re: How to uninsert an EO from EC?
- Subject: Re: How to uninsert an EO from EC?
- From: Jean-François GUILLAUD <email@hidden>
- Date: Thu, 28 Oct 2004 15:32:21 +0200
- Organization: CRI - Universite de La Rochelle
Hi All,
I agree with Pierre, a deleteObject() should work. But your problem
seems to be a jod for nested editing context. See EOEditingContext
javadoc (at "Using EOEditingContexts in Different Configurations"
<cid:email@hidden>) for more explanations.
Shortly, you could work on a subset of your object graph,
create/modify/delete objects. At the end you could save your changes
that are "committed" to your parent editing context. Otherwise, you
simply cancel your changes in your nested context without any change to
you parent context.
Regards
JF
email@hidden a écrit :
Hi!
A simple call to deleteObject() should do the trick. There were times where this would lead to a crash at save time. I had filed a bug report on this and it got fixed in one of the latest updates.
Pierre
-----Original Message-----
From: webobjects-dev-bounces+pierre.bernard=email@hidden
[mailto:webobjects-dev-bounces+pierre.bernard=email@hidden]On
Behalf Of Marek Wawrzyczny
Sent: Thursday, October 28, 2004 4:26 AM
To: WebObjects (Group)
Subject: How to uninsert an EO from EC?
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:
This email sent to email@hidden
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
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--
Jean-Francois GUILLAUD
CRI - Universite de La Rochelle
23 Avenue A. Einstein
17000 La Rochelle
Tel: 05 46 45 82 14
_______________________________________________
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