Hi to all bakers!

I'm diving into Cake1.2 relations while building a demo ACL
application (Just to learn about...)

I'm creating a custom plugin to solve this issue so my tables have a
custom name just to mantain order into db:

Model "Yuser" -> Table "freyr_users"
Model "Ypermission" -> Table "freyr_permissions"

I built a join_table like:

Table name: "freyr_objects_permissions"
object_id | bigint (16)
permission_id | bigint (16)

I have set up my "Yuser <-> YPermission" HABTM relation this way:

var $hasAndBelongsToMany = array(
        'Ypermission' => array(
                'className'                     => 'Ypermission',
                'joinTable'                             => 
'freyr_objects_permissions',
                'foreignKey'                    => 'object_id',
                'associationForeignKey' => 'permission_id',
        ),
);

This relation causes a "missing table" error because "Ypermission"
model try to use a table named "ypermissions" (just using naming
conventions)... It seems to ignore the "useTable" directive set into
model.

I have temporary solved this problem just renaming
"freyr_ypermissions" into "ypermissions" but I want to use custom
table names to maintain order in my db!

Tables grows up every day!!!!
--~--~---------~--~----~------------~-------~--~----~
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