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

[email protected] wrote:
Is there someone that can help me about this?

On 2 Feb, 19:02, "[email protected]" <[email protected]>
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.it MUSIC: 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 [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