No, there is no such optimization. Once you are in the OO world, you stay there: an optimization would break if you were to have uncommited additions to "books"

There are however ways to have such operations performed by the database:
http://code.google.com/p/houdah-webobjects-frameworks/source/browse/trunk/HoudahEOAccess/src/com/houdah/eoaccess/utilities/SpecialityFetches.java

Best,
Pierre Bernard
Houdah Software s.à r.l.

On 28 Apr 2008, at 16:54, Florijan Stamenkovic wrote:

Hi all,

Is there an optimization in EOF not to fire a fault for a to-many when it is asked for a @sum across it?

An idiotic example:

Author a = //   fetch an author, do NOT pre-fetch it's "books"
Integer numberOfPagesSum = (Integer)a.valueForKeyPath("[EMAIL PROTECTED]");

F
_______________________________________________
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/webobjects-dev%40houdah.com

This email sent to [EMAIL PROTECTED]

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




---
Pierre Bernard
http://www.bernard-web.com/pierre
http://www.houdah.com



Attachment: smime.p7s
Description: S/MIME cryptographic signature

 _______________________________________________
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