I think that the use of 'with' and 'joinTable' attributes is excatly for tha case where models tables don't respect the cake convention otherwise these attributes aren't useful
On 3 Feb, 15:23, Lorenzo Bettini <bett...@dsi.unifi.it> wrote: > I'm not sure, but it looks like the problem is due to the table name > which is in Italian, thus, it does not respect the conventions of > cakephp; have you got a model for GroupsUser as well? I mean a real > class for that model? In that case, you need to make sure that that > class has the right name for the used table. > > I guess. > > cheers > Lorenzo > > > > marco.rizze...@gmail.com wrote: > > Is there someone that can help me about this? > > > On 2 Feb, 19:02, "marco.rizze...@gmail.com" <marco.rizze...@gmail.com> > > wrote: > >> Hi > >> I'm working on a legacy system , i must to defina an HABTM relation > >> between User and Group. In User model I have this: > > >> var $hasAndBelongsToMany=array( > >> 'Group' =>array( > >> 'className' => 'Group', > >> 'joinTable' => 'utenti_gruppi', > >> 'with' => 'GroupsUser', > >> 'foreignKey' => 'username', > >> 'associationForeignKey'=> 'gruppo_id', > >> 'order' => 'gruppo_nome ASC' > >> ) > >> ); > > >> But I get this error: > > >> Error: Database table groups_users for model GroupsUser was not > >> found. > > >> Is it not possible define a HABTM relation with 'with' and with > >> 'joinTable' that I want? > > -- > Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino > HOME:http://www.lorenzobettini.itMUSIC:http://www.purplesucker.com > BLOGS:http://tronprog.blogspot.com http://longlivemusic.blogspot.com Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en