TABLES :

A) types: id, name, slug

B) famille_types: id, name, type_famille

C) famille_types_types (this is the join table) : type_id,
famille_type_id


MODEL ASSOCIATION :

"Type" HABTM "FamilleType"


In a index view, I would like paginate Type order by
"famille_types.name" not "famille_types.id" which is the default
behavior.

Here is the SQL request I would like to reproduce:

"SELECT types.id, types.slug, types.name, famille_types.name FROM
types INNER JOIN famille_types_types ON famille_types_types.type_id =
types.id INNER JOIN famille_types ON
famille_types_types.famille_type_id = famille_types.id ORDER BY
famille_types.name"

So how can I do that?
--~--~---------~--~----~------------~-------~--~----~
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