Re: The object with globalID cannot be found
Re: The object with globalID cannot be found
- Subject: Re: The object with globalID cannot be found
- From: Chuck Hill <email@hidden>
- Date: Mon, 24 Nov 2008 12:13:43 -0800
Hi Henrique,
On Nov 24, 2008, at 6:44 AM, Henrique Prange wrote:
Hi all,
I'm having problems with inheritance, separate models, D2W and
Oracle. I'm getting the following exception:
java.lang.IllegalStateException: The object with globalID
_EOIntegralKeyGlobalID[Action (java.lang.Integer)1] could not be
found in the database. This could be result of a referential
integrity problem with the database. An empty fault could not be
created because the object's class could not be determined (e.g. the
GID is temporary or it is for an abstract entity).
I'll try to illustrate the situation: I have a model A with an
entity X and a model B with an entity Y. Y is abstract and is the
super type for Y' and Y'' entities. The entity X has a relationship
with the abstract entity Y. The inheritance uses the single table
approach. So, Y' and Y'' records are saved in the same table Y.
There is a strange detail. This problem is not always reproducible
and sometimes everything just works as expected. I've verified and
the referenced record exists on database.
I found this thread [1] about the same subject, but there is no much
conclusion about the proper solution. I suspect the problem will
completely disappear if I merge both models. But I want to hear your
opinion first.
I'm using WO 5.4.1 and Wonder 4.0 (from 04-24-2008) by the way.
Thanks for any advice.
[1]http://lists.apple.com/archives/webobjects-dev/2007/Nov/msg00686.html
Cheers,
Henrique
From your descriptions, it sounds like the models are not getting
connected with the same connection dictionary. Try using the
EOUtilities method:
public static EODatabaseContext
databaseContextForModelNamed(EOEditingContext ec, String name)
To get the EODatabaseContext and EODatabase from each model and test
if they are the same objects or not. They should be the same.
Chuck
--
Chuck Hill Senior Consultant / VP Development
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
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