|
Hi Chuck, Chuck Hill wrote: Hi Peter,That is not exactly what i am talking about. The code below demonstrates what i am talking about. EOEditingContext ec = new EOEditingContext(); ec.lock(); try { Order order = (Order) EOUtilities.createAndInsertInstance( ec, "Order" ); // set order properties so it can be saved successfully ec.saveChanges(); ec.deleteObject( order); NSLog.out.appendln("should see awakeFromInsertion call now..."); ec.revert(); NSLog.out.appendln("did you see the awakeFromInsertion call?"); } catch (Exception e) { System.err.println("Error with test"); e.printStackTrace(); } finally { ec.unlock(); } The stack trace (the interesting part) that i get when this happens is: java.lang.RuntimeException: backtrace at com.etechgroup.test.eo.Order.awakeFromInsertion(Order.java:44) at com.webobjects.eocontrol.EOEditingContext.insertObjectWithGlobalID(EOEditingContext.java:2851) at com.webobjects.eocontrol.EOEditingContext.insertObject(EOEditingContext.java:2871) at com.webobjects.eocontrol.EOEditingContext.revert(EOEditingContext.java:4570) It looks as though the editing context re-inserts a deleted EO if that EO is not newly created and you revert. Thanks --
Peter Vandoros Software Engineer Etech Group Pty Ltd Level 3/21 Victoria St Melbourne VIC 3000 Australia Ph: +61 3 9639 9677 Fax: +61 3 9639 9577 ---------------------------------- IMPORTANT: This e-mail message and any attachments are confidential and may be privileged. If received in error, please reply to this message and destroy all copies and any attachments. You should check this message and any attachments for viruses or defects. Our liability is limited to resupplying any affected message or attachments. For more information about Etech Group, please visit us at http://www.etechgroup.com.au. |
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]
