• 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
"Cannot obtain globalId for an object which..."
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

"Cannot obtain globalId for an object which..."


  • Subject: "Cannot obtain globalId for an object which..."
  • From: Kaj Hejer <email@hidden>
  • Date: Tue, 10 Jun 2003 21:18:47 +0200

Hei!

In the method bellow from a EO object

    public NSArray getPasienterWithPrefetch() {
        NSArray args = new NSArray(new Object[] { this });
        EOQualifier qual =
           EOQualifier.qualifierWithQualifierFormat("arkivinstans = %@", args);
        EOFetchSpecification fs =
           new EOFetchSpecification("Pasient", qual, null);
        NSMutableArray prefetchPaths = new NSMutableArray();
        prefetchPaths.addObject("kasus");
        prefetchPaths.addObject("hovedkasus");
        prefetchPaths.addObject("kjonn");
        fs.setPrefetchingRelationshipKeyPaths(prefetchPaths);
        return editingContext().objectsWithFetchSpecification(fs);
    }

objectsWithFetchSpecification gives the exception I include bellow. The object on which I call this method is insterted in session.defaultEditingContext().

How is it possible to get this exception when I don't refere to any other objects, but only use this and editingContext()?

I also get a bit confused about what "databaseContext's active editingContext" mean. This is clearly different from the editingContext of the object on which I call this method.

I think there is something important missing from my WOKnowledge here.

Here is the exception:

Cannot obtain globalId for an object which is registered in an other than the databaseContext's active editingContext, object: {values =

[removed some debuginfo]

this = "<Arkivinstans 26154b _EOIntegralKeyGlobalID[Arkivinstans (java.lang.Integer)1]>"; }, databaseContext: com.webobjects.eoaccess.EODatabaseContext@2613f8, object's editingContext: com.webobjects.eocontrol.EOEditingContext@76c074, databaseContext's active editingContext: com.webobjects.eocontrol.EOEditingContext@1b9a30
at com.webobjects.eoaccess.EODatabaseContext._globalIDForObject(EODatabaseContext.java:4677)
at com.webobjects.eoaccess.EODatabaseContext.databaseOperationForObject(EODatabaseContext.java:4780)
at com.webobjects.eoaccess.EODatabaseContext.valuesForKeys(EODatabaseContext.java:6483)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.valuesForKeys(EOObjectStoreCoordinator.java:316)
at com.webobjects.eoaccess.EOQualifierSQLGeneration$_KeyValueQualifierSupport.schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:381)
at com.webobjects.eoaccess.EOQualifierSQLGeneration$Support._schemaBasedQualifierWithRootEntity(EOQualifierSQLGeneration.java:132)
at com.webobjects.eoaccess.EODatabaseChannel.selectObjectsWithFetchSpecification(EODatabaseChannel.java:212)
at com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificationEditingContext(EODatabaseContext.java:3007)
at com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(EODatabaseContext.java:3148)
at com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecification(EOObjectStoreCoordinator.java:472)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:3356)
at com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(EOEditingContext.java:3686)
at Arkivinstans.getPasienterWithPrefetch(Unknown Source)
at Arkivinstans.getSynligePasienter(Unknown Source)
at Navigation.shouldShowPasientRapportLink(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at




-Kaj :)
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: "Cannot obtain globalId for an object which..."
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: [NEWBIE] Adding files / targets...
  • Next by Date: Re: "Cannot obtain globalId for an object which..."
  • Previous by thread: Re: Can Dreamweaver Edit .wo files?
  • Next by thread: Re: "Cannot obtain globalId for an object which..."
  • Index(es):
    • Date
    • Thread