Re: How to debug fetch problem
Re: How to debug fetch problem
- Subject: Re: How to debug fetch problem
- From: Mike Schrag <email@hidden>
- Date: Tue, 10 Apr 2007 09:34:30 -0400
I don't do the saved fetch spec thing either, but I highly recommend
that if you do, you should EOGenerate them into your class files so
you don't have this problem again. I think there's an example of
that on the wikibook page about eogenerator.
ms
On Apr 9, 2007, at 10:33 PM, Janine Sisk wrote:
Ah... I tried that a while ago and got a different error, so I
thought it was wrong. But I have some printlns in there now and I
get my result.count() before the other error occurs, so now I know
you are correct. As if there was any doubt. :)
janine
On Apr 9, 2007, at 7:25 PM, Chuck Hill wrote:
I'm not really a "fetch spec in the model" kind of guy, but the
mismatch between LicensePlate and Panel seems suspicious. The
second parameter to that function is the name of the entity where
this fetch spec is declared. It seems to me like this should be
Panel not LicensePlate.
Chuck
On Apr 9, 2007, at 7:08 PM, Janine Sisk wrote:
I've just attempted my first fetch, and predictably it's not
working. This code:
EOEditingContext ec = session().defaultEditingContext();
EOFetchSpecification fs =
EOFetchSpecification.fetchSpecificationNamed("getAllPanels",
"LicensePlate");
NSArray result = ec.objectsWithFetchSpecification(fs);
results in an NPE on the last line.
I am not at all sure I created the fetch spec right; the fspec
file contains:
{
getAllPanels =
{
class = EOFetchSpecification;
entityName = Panel;
prefetchingRelationshipKeyPaths =
();
sortOrderings =
(
{
class = EOSortOrdering;
key = description;
selectorName = ascending;
}
);
};
}
How do I go about figuring out what I've done wrong?
thanks,
janine
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
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:
40mdimension.com
This email sent to email@hidden
_______________________________________________
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