• 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: setUser() vs. setUserRelationship()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setUser() vs. setUserRelationship()


  • Subject: Re: setUser() vs. setUserRelationship()
  • From: Marius Soutier <email@hidden>
  • Date: Tue, 02 Aug 2011 21:05:11 +0200

Ah yes, I tried that option, but in one of our projects, which originated as a non-Wonder project, it doesn't work:

ERROR com.webobjects.eoaccess.ERXEntityDependencyOrderingDelegate  - Unexpected non-EOGeneralAdaptorException exception
IllegalStateException: Attempt to access an EO that has either not been inserted into any EOEditingContext or its EOEditingContext has already been disposed
  at com.webobjects.eocontrol.EOCustomObject.willRead(EOCustomObject.java:1158)
  at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_GenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:570)
  at com.webobjects.eocontrol._EOMutableKnownKeyDictionary$Initializer$_LazyGenericRecordBinding.valueInObject(_EOMutableKnownKeyDictionary.java:613)
  at com.webobjects.eocontrol.EOCustomObject.storedValueForKey(EOCustomObject.java:1634)
  at net.starhealthcare.sffoundation.model.base._SFActor.sFIncidentsAsActor(_SFActor.java:48)
     ... skipped 6 stack elements
  at er.extensions.eof.ERXGenericRecord$InverseRelationshipUpdater.takeStoredValueForKey(ERXGenericRecord.java:1619)
  at er.extensions.eof.ERXGenericRecord.takeStoredValueForKey(ERXGenericRecord.java:1400)
  at com.webobjects.eocontrol.EOKeyValueCoding$_StoredForwardingBinding.setValueInObject(EOKeyValueCoding.java:240)
     ... skipped 2 stack elements
  at com.webobjects.eocontrol.EOObjectStoreCoordinator.initializeObject(EOObjectStoreCoordinator.java:597)
  at com.webobjects.eocontrol.EOEditingContext.initializeObject(EOEditingContext.java:3768)
     ... skipped 3 stack elements
  at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:488)
  at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:4069)
     ... skipped 1 stack elements
  at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsForSourceGlobalID(EOObjectStoreCoordinator.java:634)
  at com.webobjects.eocontrol.EOEditingContext.objectsForSourceGlobalID(EOEditingContext.java:3923)
     ... skipped 1 stack elements
  at com.webobjects.eoaccess.EOAccessArrayFaultHandler.completeInitializationOfObject(EOAccessArrayFaultHandler.java:77)
  at com.webobjects.eocontrol._EOCheapCopyMutableArray.willRead(_EOCheapCopyMutableArray.java:39)
  at com.webobjects.eocontrol._EOCheapCopyMutableArray.count(_EOCheapCopyMutableArray.java:96)
  at com.webobjects.foundation.NSArray.containsObject(NSArray.java:454)
  at com.webobjects.eocontrol.EOCustomObject.includeObjectIntoPropertyWithKey(EOCustomObject.java:904)
  at er.extensions.eof.ERXGenericRecord.includeObjectIntoPropertyWithKey(ERXGenericRecord.java:1375)

On 02.08.2011, at 18:38, Kieran Kelleher wrote:

Not sure if your template is the same as mine, but for me, both methods do the EXACT SAME thing when er.extensions.ERXEnterpriseObject.updateInverseRelationships property is set to true. ( @see er.extensions.eof.ERXGenericRecord.InverseRelationshipUpdater.updateInverseRelationships() ). So you could actually set that property to true and get rid of the setXxxxRelationship method (or at least add @Deprecated to it so it can be hidden from code-assist) from your eogen template. Mike Schrag wrote that feature …. and it does the "right" thing. However, IIRC it is 'false' by default

 _______________________________________________
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

References: 
 >setUser() vs. setUserRelationship() (From: Marius Soutier <email@hidden>)
 >Re: setUser() vs. setUserRelationship() (From: George Domurot <email@hidden>)
 >Re: setUser() vs. setUserRelationship() (From: Kieran Kelleher <email@hidden>)

  • Prev by Date: Re: setUser() vs. setUserRelationship()
  • Next by Date: [workaround]: Re: SQL generation problem with Entity Modeler
  • Previous by thread: Re: setUser() vs. setUserRelationship()
  • Next by thread: EOModelDoc output no longer viewable with Safari 5.1, Firefox 5.0.1
  • Index(es):
    • Date
    • Thread