Olivier,

CakePHP does one query to get all the resources, grabs the IDs and
then grabs all of the marks that have those IDs.

Try this:
"finderQuery" => 'SELECT AVG(Mark.value) AS average FROM res_marks AS
Mark WHERE Mark.resource_id IN ({$__cakeID__$})'

Let me know if that works. It sounds like a good solution.

On Fri, Jul 4, 2008 at 9:41 AM, OLance <[EMAIL PROTECTED]> wrote:
>
> Well... I was beginning to say that you didn't understand my
> problem... but after some minutes I realized that maybe I've just not
> understood how Cake works on this association overriding mechanism...
>
> Would you have any docs/tips on that ?
> As for the SQL tutorial I'm fine, thanks ^^

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to