Friday, November 28, 2008

HABTM question

I've got a fairly good grasp on the HABTM concept/implementation, but
would like to add a twist: Suppose we have users and movies tables.
A user can select 'favorites' from the movies table, as many as he/she
wishes. So the movies_users table would have an ID, a movie and a
user field.

Now the twist. What if the user wanted to order the preference the
list of his/her movies? Would we add a 'preference' or 'order' field
to the HABTM table (movies_users)? If so, how would that be
implemented in the controller and/or add form?


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

No comments: