Hey there bakers.

I couldn't find an appropriate answer to this anywhere. Suppose I have
three models:

Bakery <- hasAndBelongsToMany -> Baker <- hasAndBelongsToMany ->
Cookie

Suppose there is a cookie baking contest going on. Every cookie is
rated for quality (int Cookie.quality). I would like to do a find()
for a certain bakery, and then *sort the employed bakers there by the
rate of their baked cookies*. I tried stuff like setting the 'order'
property to 'Cookie.quality' in the Cookie model file, but of course
that just orders the cookies, and doesn't sort the bakers. The same
goes for setting 'Cookie.quality' as the sorting parameter in the
find() call.

Of course I could just sort the bakers afterwards with my own custom
sort function, but is there a way to do this automagically?


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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