Re: Using Pierre's ExistsInRelationshipQualifier
Re: Using Pierre's ExistsInRelationshipQualifier
- Subject: Re: Using Pierre's ExistsInRelationshipQualifier
- From: Greg <email@hidden>
- Date: Thu, 12 May 2005 12:12:53 +1000
Thanks Mike. I couldn't find anywhere on how to register them.
Greg
On 12/05/2005, at 11:59 AM, Mike Schrag wrote:
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._objectsWithFetchSpecificat
ionEditingContext(EODatabaseContext.java:3177)
at
com.webobjects.eoaccess.EODatabaseContext.objectsWithFetchSpecificati
on(EODatabaseContext.java:3337)
at
com.webobjects.eocontrol.EOObjectStoreCoordinator.objectsWithFetchSpe
cification(EOObjectStoreCoordinator.java:539)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificati
on(EOEditingContext.java:4053)
at er.extensions.ERXEC.objectsWithFetchSpecification
(ERXEC.java:557)
at
com.webobjects.eocontrol.EOEditingContext.objectsWithFetchSpecificati
on(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