| Edgar, Here is an example illustrating your efforts to translate a newly inserted EO from one EC to another: Agent 1: This is a newly created EO (NOT SAVED): {values = {middleName = <com.webobjects.foundation.NSKeyValueCoding$Null>; lastName = <com.webobjects.foundation.NSKeyValueCoding$Null>; addresses = (); entryTimestamp = 2006-07-24 14:02:12 Etc/GMT; drivers = (); companyNumber = <com.webobjects.foundation.NSKeyValueCoding$Null>; emails = (); phones = (); terminalCode = <com.webobjects.foundation.NSKeyValueCoding$Null>; firstName = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = "<Agent 4bc336 <EOTemporaryGlobalID: 0 0 10 1 21 -32 0 0 -39 3 1 0 0 0 1 12 -96 -41 -52 31 11 32 117 94>>"; } Existing Agent: This is an existing EO fetched from databases: {values = {middleName = <com.webobjects.foundation.NSKeyValueCoding$Null>; lastName = <com.webobjects.foundation.NSKeyValueCoding$Null>; addresses = "<com.webobjects.eocontrol._EOCheapCopyMutableArray 3cfd6e (<EOAccessArrayFaultHandler addresses _EOIntegralKeyGlobalID[Agent (java.lang.Integer)3295]>)>"; entryTimestamp = 2004-06-29 21:40:01 Etc/GMT; drivers = "<com.webobjects.eocontrol._EOCheapCopyMutableArray 42e40c (<EOAccessArrayFaultHandler drivers _EOIntegralKeyGlobalID[Agent (java.lang.Integer)3295]>)>"; companyNumber = 2; emails = "<com.webobjects.eocontrol._EOCheapCopyMutableArray 9220cb (<EOAccessArrayFaultHandler emails _EOIntegralKeyGlobalID[Agent (java.lang.Integer)3295]>)>"; phones = "<com.webobjects.eocontrol._EOCheapCopyMutableArray e50215 (<EOAccessArrayFaultHandler phones _EOIntegralKeyGlobalID[Agent (java.lang.Integer)3295]>)>"; terminalCode = "AAA"; firstName = <com.webobjects.foundation.NSKeyValueCoding$Null>; }; this = "<Agent bb8077 _EOIntegralKeyGlobalID[Agent (java.lang.Integer)3295]>"; } Agent 2: This is another new EO created using: Agent anAgent2 = (Agent)ec2.faultForGlobalID(ec1.globalIDForObject(anAgent1), ec2); null Notice the difference above between the EOGlobalID's of the newly inserted EO and the existing EO fetched from the database. EOTemporaryGlobalID cannot be used to translate an EO from one EOEditingContext to another. Notice that the result is <null> rather than a new fault object representing an EO. On Jul 24, 2006, at 8:37 AM, Ken Anderson wrote:
-- Robert Walker |
_______________________________________________ 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]
