I suspect that you'd be far better off with role_id in the users table. Unless it denotes a particular role (among many) that a user had when making the post.
users belongsTo roles, HABTM posts posts HABTM users posts_users (user_id, post_id) On Tue, Mar 25, 2008 at 5:35 AM, Guillaume Chomat <[EMAIL PROTECTED]> wrote: > > Hi everybody, > > Is cake able to read any referenced model in a join table? > > Suppose we have three entities table: > - users > - posts > - roles > > and a join table: > - posts_users. > > The join table posts_users has a field role_id, foreign key to the > roles table. > > We have defined the HABTM relationship in the user model. > So now, we would like to be able to read the posts associated to the > user but also get the role specified in the relation. > > Is it possible without defining the finderQuery field in the HABTM > relationship? > > Thanks in advance for your help > > Kind Regards > > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
