Re: Fetching abstract entity
Re: Fetching abstract entity
- Subject: Re: Fetching abstract entity
- From: Chuck Hill <email@hidden>
- Date: Fri, 30 May 2008 12:46:52 -0700
The other possibility is that the model with the subclasses is not
getting loaded. Maybe not under Resources/ in the Eclipse built
framework?
On May 30, 2008, at 12:44 PM, Jean-François Veillette wrote:
I have never needed the qualifier before.
This is a project freshly switched from xcode to eclipse, so things
may not be stable yet in eclipse for this project.
Anyway, I'll try to add the qualifier on 'B' and hope it works ...
and see what kind of sql it generate.
- jfv
Le 08-05-30 à 15:37, Chuck Hill a écrit :
On May 30, 2008, at 12:35 PM, Jean-François Veillette wrote:
More details ...
single table inheritance,
no restricting qualifiers, there is only one concrete entity for
one abstract entity.
I have never used it like that. I expected that you would still
need the restricting qualifier.
Chuck
Le 08-05-30 à 15:14, Chuck Hill a écrit :
On May 30, 2008, at 11:17 AM, Jean-François Veillette wrote:
I have 2 models, one which contain a set of abstract eoentity,
another one which contain a set of concret eoentity (subclasses
of the abstract set).
It was working just right, but suddently after reinstalling one
of the framework, it just stopped working. I can't make it work
again.
Whenever I fetch an abstract entity (assuming, I will get
objects of the concrete entity), it now return me an object
of the abstract entity type.
Details ...
A - abstract eoentity name
CA - java classe for eoentity 'A'
B - concrete eoentity name, sub-entity of 'A'
CB - java classe of 'B'
NSMutableDictionary dict = new NSMutableDictionary();
dict.takeValueForKey(k1, "key1");
dict.takeValueForKey(k2, "key2");
expectCBInstance = (CB)
EOUtilities.objectMatchingValues(ec, "A", dict);
But EOUtilities return me "CA" instances.
Any idea why EOF fetch abstract entity and not the concrete one ?
Which kind of inheritance (single table, vertical, horizontal)?
Did the restricting qualifiers get lost or changed in the model
or database?
Chuck
--
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