• 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: Couting the objects that would be returned by a fetch specification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Couting the objects that would be returned by a fetch specification


  • Subject: Re: Couting the objects that would be returned by a fetch specification
  • From: Robert Walker <email@hidden>
  • Date: Sun, 22 Jan 2006 01:11:32 -0500

I just simply use raw SQL for this using EOUtilities.rawRowsForSQL (ec, modelName, sql, keys). Just send the SQL something like "SELECT COUNT(OID) FROM MY_TABLE"

This will return the result in an array containing one raw row dictionary. In the fourth argument of the method you can supply a key that you can use to extract the count.
--
Robert Walker
email@hidden


There are 10 types of people in the world, those who count in binary, and those who don't.


On Jan 21, 2006, at 3:40 PM, Jerry W. Walker wrote:

Hi, Miguel,

You might try CountFetcher.java which can be downloaded from:

http://wocode.com/cgi-bin/WebObjects/WOCode.woa/2/wa/ ShareCodeItem?itemId=429

Regards,
Jerry

On Jan 21, 2006, at 2:10 PM, Miguel Arroz wrote:

Hi!

This is probably very obvious, but... how can I count the objects that would be retuned by a fetch specification, but without actually fetching them (or creating faults for them)? What I would like to do is something like the COUNT SQL function.

  Yours

Miguel Arroz

"We have no sympathy for the lost souls
We've chosen the path of disgrace
We give this life to our children
And teach them to hate this place" -- Apocalyptica, Life Burns!

Miguel Arroz
http://www.ipragma.com


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40gmail.com


This email sent to email@hidden


--
__ Jerry W. Walker,
WebObjects Developer/Instructor for High Performance Industrial Strength Internet Enabled Systems


    email@hidden
    203 278-4085        office



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.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
References: 
 >Couting the objects that would be returned by a fetch specification (From: Miguel Arroz <email@hidden>)
 >Re: Couting the objects that would be returned by a fetch specification (From: "Jerry W. Walker" <email@hidden>)

  • Prev by Date: Re: Managing EOF caching
  • Next by Date: Re: Managing EOF caching
  • Previous by thread: Re: Couting the objects that would be returned by a fetch specification
  • Next by thread: No template found for component Main at jar:file
  • Index(es):
    • Date
    • Thread