• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Qualify data based on non-class property
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Qualify data based on non-class property


  • Subject: Re: Qualify data based on non-class property
  • From: "Shravan Kumar. M" <email@hidden>
  • Date: Sat, 28 Nov 2009 11:14:54 -0800 (PST)

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@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: Qualify data based on non-class property
  • Next by Date: Re: eclipse version
  • Previous by thread: Re: Qualify data based on non-class property
  • Next by thread: iphone web page development - is this the right forum?
  • Index(es):
    • Date
    • Thread