EOSQLQualifier error
EOSQLQualifier error
- Subject: EOSQLQualifier error
- From: Gilles MATHURIN <email@hidden>
- Date: Tue, 02 Jan 2007 06:13:30 -0800
Hello All and Happy new year 2007 !!
I have an error when trying to use an EOSQLQualifier statement. Here is the statement in his method and following the error log obtained when building
----- Method ------
public void appendToResponse(WOResponse response, WOContext context) {
if (talents==null) {
EOEditingContext ec = new EOEditingContext();
ec.lock();
EOSortOrdering lastName = EOSortOrdering.sortOrderingWithKey("lastName", EOSortOrdering.CompareAscending);
EOSortOrdering firstName = EOSortOrdering.sortOrderingWithKey("firstName", EOSortOrdering.CompareAscending);
NSArray orderings = new NSArray(new Object[] {lastName, firstName});
EOEntity talentEntity = EOUtilities.entityNamed(ec,"Talent");
EOSQLQualifier sqlQualifier = new EOSQLQualifier(talentEntity, "TALENT_ID IN (SELECT TALENT_ID FROM MOVIE_ROLE)");
EOQualifier qualifier = sqlQualifier;
if (lastNameQueryString !=null) {
NSArray qualifierBindings = new NSArray (new String[] {lastNameQueryString+"*"});
qualifier = EOQualifier.qualifierWithQualifierFormat("lastName like %@", qualifierBindings);
qualifier = new EOAndQualifier(new NSArray(new Object[] {qualifier, sqlQualifier}));
}
EOFetchSpecification fetchSpec = new EOFetchSpecification("Talent", qualifier, orderings);
fetchSpec.setFetchesRawRows(true);
talents = ec.objectsWithFetchSpecification(fetchSpec);
}
super.appendToResponse(response,context);
}
----------------------
----- Error Stack ------
TalentListPage.java:43: cannot find symbol
symbol : constructor EOSQLQualifier(com.webobjects.eoaccess.EOEntity,java.lang.String)
location: class com.webobjects.eoaccess.EOSQLQualifier
EOSQLQualifier sqlQualifier = new EOSQLQualifier( talentEntity, "TALENT_ID IN (SELECT TALENT_ID FROM MOVIE_ROLE)");
^
Note: TalentListPage.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
---------------------------
Any idea of what is going wrong, i saw it is a depecrated API, does it mean it is no longer part of the WO frameworks ?
if so, any idea of how can i integrate the none depecrated API suggested by the docs ? Which are : EOAdaptorChannel.evaluateExpression() or EOFetchSpecification.setHints()
Thanks.
_______________________________________________
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