• 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
objectsWithFetchSpecificationAndBindings, what attribute to use on an NSArray
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

objectsWithFetchSpecificationAndBindings, what attribute to use on an NSArray


  • Subject: objectsWithFetchSpecificationAndBindings, what attribute to use on an NSArray
  • From: Baiss Eric Magnusson <email@hidden>
  • Date: Wed, 26 Sep 2007 11:56:59 -0700

How can I write a Fetch Specification where one of its conditions is to check for an NSArray length of greater than zero.

I need to get a sorted array:
Area ofArea;
bindings.setObjectForKey( ofArea.getPrimaryKey(), "areaID" );
eventsWithRegistrants = EOUtilities.objectsWithFetchSpecificationAndBindings( ec, "getEventsWithRegistrants", "dancers", bindings );


In the DanceEvent table in EOModeler I have the Fetch Specification <getEventsWithRegistrants>:

	((areaID = $areaID) and (dancers.count > 0))

In EOGenericRecord sub-class:

 public NSArray dancers() {
        return (NSArray)storedValueForKey("dancers");
    }

But I get IllegalStateException] sqlStringForKeyValueQualifier: attempt to generate SQL for com.webobjects.eocontrol.EOKeyValueQualifier (dancers.count > (java.math.BigDecimal)'0') failed because attribute identified by key 'dancers.count' was not reachable from from entity 'DanceEvent': getEventsWithRegistrants failed

Do I have to use a derived attribute? ( I couldn't figure out how to get EOModel to create one ).
----
Baiss Eric Magnusson
<http://www.Track-Your-Finances.com>
<http://www.CascadeWebDesign.com>



_______________________________________________ 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: just a reminder
  • Next by Date: EvaluateExpression fails for a Derived Column
  • Previous by thread: Re: background
  • Next by thread: EvaluateExpression fails for a Derived Column
  • Index(es):
    • Date
    • Thread