Re: Using Pierre's ExistsInRelationshipQualifier
Re: Using Pierre's ExistsInRelationshipQualifier
- Subject: Re: Using Pierre's ExistsInRelationshipQualifier
- From: Mike Schrag <email@hidden>
- Date: Wed, 11 May 2005 21:59:16 -0400
I don't know if this is the proper way, but this is how I fixed this
for InSetQualifier:
In Application, I added:
QualifierGenerationSupport.setSupportForClass(new
InSetQualifierSupport(), InSetQualifier.class);
And that properly registered the QualifierSupport implementation for
that Qualifier.
ms
On May 11, 2005, at 9:52 PM, Greg wrote:
I am trying to use the ExistsInRelationshipQualifier but when I try
and fetch the data, I'm getting an exception saying that it does
implement the EOQualifierSQLGeneration interface. Does anyone have
any sample code on how to use the class?
public NSArray images() {
EOOrQualifier qualifier;
EOKeyValueQualifier annotation = new EOKeyValueQualifier
("annotation", EOQualifier.QualifierOperatorCaseInsensitiveLike,
"*"+query+"*");
EOKeyValueQualifier filename = new EOKeyValueQualifier
("filename", EOQualifier.QualifierOperatorCaseInsensitiveLike,
"*"+query+"*");
EOKeyValueQualifier name = new EOKeyValueQualifier("name",
EOQualifier.QualifierOperatorCaseInsensitiveLike, "*"+query+"*");
ExistsInRelationshipQualifier tags = new
ExistsInRelationshipQualifier("tags", name);
Object ors[] = { annotation, filename, tags };
qualifier = new EOOrQualifier(new NSArray(ors));
EOSortOrdering popular = EOSortOrdering.sortOrderingWithKey
("cachedRating", EOSortOrdering.CompareAscending);
NSMutableArray order = new NSMutableArray(popular);
EOFetchSpecification fs = new EOFetchSpecification
("ClientImage", qualifier, order);
fs.setFetchesRawRows(true);
fs.setFetchLimit(resultsPerPage.intValue());
return theSession().defaultEditingContext
().objectsWithFetchSpecification(fs);
}
Any help is greatly appreciated.
Regards,
Greg
2005-05-12 11:30:42,789 ERROR Dev[13046:2011 6] ERXApplication
(ERXApplication.java:484) - Exception caught: Qualifier (tags
CONTAINS ((name caseinsensitivelike '*empire*')) (class
my.control.ExistsInRelationshipQualifier (does not implement
EOQualifierSQLGeneration
Extra info: {CurrentPage =
"au.com.shoebox.consumer.PASearchResult"; CurrentComponentHierarchy
= ("au.com.shoebox.woapplication.components.StoreTable",
"au.com.shoebox.consumer.PASearchResult"); CurrentComponent =
"au.com.shoebox.woapplication.components.StoreTable";
PreviousPageList = (); uri = "/ShoeBox/WebObjects/Dev.woa/1/wo/
H0dz6HvMwluttQS633Yl50/0.0.15.5"; }
java.lang.IllegalArgumentException: Qualifier (tags CONTAINS ((name
caseinsensitivelike '*empire*')) (class
my.control.ExistsInRelationshipQualifier (does not implement
EOQualifierSQLGeneration
at com.webobjects.eoaccess.EOQualifierSQLGeneration
$Support._schemaBasedQualifierWithRootEntity
(EOQualifierSQLGeneration.java:163)
at com.webobjects.eoaccess.EOQualifierSQLGeneration
$_OrQualifierSupport.schemaBasedQualifierWithRootEntity
(EOQualifierSQLGeneration.java:536)
at com.webobjects.eoaccess.EOQualifierSQLGeneration
$Support._schemaBasedQualifierWithRootEntity
(EOQualifierSQLGeneration.java:165)
at
com.webobjects.eoaccess.EODatabaseContext._fetchRawRowKeyPaths
(EODatabaseContext.java:3096)
at
com.webobjects.eoaccess.EODatabaseContext._objectsWithFetchSpecificati
onEditingContext(EODatabaseContext.java:3177)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecificatio
n(EODatabaseContext.java:3337)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpec
ification(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificatio
n(EOEditingContext.java:4053)
at er.extensions.ERXEC.objectsWithFetchSpecification
(ERXEC.java:557)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificatio
n(EOEditingContext.java:4438)
at au.com.shoebox.consumer.PASearchResult.images
(PASearchResult.java:73)
_______________________________________________
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