Thanks for your response Clark.

Actually, I have a list of customers which I have to filter based on their 
sales... but for that I have to build a qualifier to filter the data.

So, I will get customer Object reference from sales's objects, and finally I 
have to extract all the customers having sales...

occasionally I have to build qualifiers for the non-class properties :)

Thank You,
Shravan Kumar. M
------------------------------

Am I correct in assuming that sales.toCust() is a related EO? If so, you should 
be passing the name of the relationship as the key for the qualifier instead of 
the name of the foreign key, for example:

EOKeyValueQualifier custQual = new EOKeyValueQualifier("cust", 
EOQualifier.QualifierOperatorNotEqual, sales.toCust());

Clark

On 2009-11-28, at 10:51 AM, Shravan Kumar. M wrote:
Hello Group,
>
>
>Can we qualify data based on non-class property? Using following mechanism, I 
>was receiving error as shown here:
>
>
>EOKeyValueQualifier custQual = new EOKeyValueQualifier("custID", 
>EOQualifier.QualifierOperatorNotEqual, sales.toCust());
>NSArray activeCusts = EOQualifier.filteredArrayWithQualifier(sales, finalQual);
>
>
>com.webobjects.foundation.NSKeyValueCoding$UnknownKeyException: 
><com.mtj.model.Map 0xcb43d9> valueForKey(): lookup of unknown key: 'custID'.
>This class does not have an instance variable of the name custID or _custID, 
>nor a method of the name custID, _custID, getCustID, or _ getCustID
>at 
>com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.handleQueryWithUnboundKey(NSKeyValueCoding.java:1316)
>at 
>com.webobjects.eocontrol.EOCustomObject.handleQueryWithUnboundKey(EOCustomObject.java:1623)
>at 
>com.webobjects.foundation.NSKeyValueCoding$Utility.handleQueryWithUnboundKey(NSKeyValueCoding.java:544)
>at 
>com.webobjects.foundation.NSKeyValueCoding$_KeyBinding.valueInObject(NSKeyValueCoding.java:920)
>at 
>com.webobjects.eocontrol.EOCustomObject.valueForKey(EOCustomObject.java:1559)
>at 
>com.webobjects.foundation.NSKeyValueCoding$Utility.valueForKey(NSKeyValueCoding.java:498)
>at 
>com.webobjects.foundation.NSKeyValueCodingAdditions$DefaultImplementation.valueForKeyPath(NSKeyValueCodingAdditions.java:212)
>at 
>com.webobjects.eocontrol.EOCustomObject.valueForKeyPath(EOCustomObject.java:1675)
>at 
>com.webobjects.foundation.NSKeyValueCodingAdditions$Utility.valueForKeyPath(NSKeyValueCodingAdditions.java:149)
>at 
>com.webobjects.eocontrol.EOKeyValueQualifier.evaluateWithObject(EOKeyValueQualifier.java:131)
>at 
>com.webobjects.eocontrol.EOAndQualifier.evaluateWithObject(EOAndQualifier.java:96)
>at 
>com.webobjects.eocontrol.EOAndQualifier.evaluateWithObject(EOAndQualifier.java:96)
>at 
>com.webobjects.eocontrol.EOQualifier.filteredArrayWithQualifier(EOQualifier.java:635)
>at com.aso.model.Sales.activeCusts(Sales.java:514)
>
>
>
>
>
>
>Thanks in advance,
>Shravan Kumar. M
>----------------------------------


      
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to