Using Pierre's ExistsInRelationshipQualifier
Using Pierre's ExistsInRelationshipQualifier
- Subject: Using Pierre's ExistsInRelationshipQualifier
- From: Greg <email@hidden>
- Date: Thu, 12 May 2005 11:52:36 +1000
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._objectsWithFetchSpecification
EditingContext(EODatabaseContext.java:3177)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecification(
EODatabaseContext.java:3337)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpecif
ication(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
EOEditingContext.java:4053)
at er.extensions.ERXEC.objectsWithFetchSpecification
(ERXEC.java:557)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecification(
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:
This email sent to email@hidden