Hi Ape,

I tried your test too.  I substituted groups and users in place of
your artices tags,  of course.
Did NOT work.

Here is my latest model for group.php:
class Group extends AppModel {
        var $name = 'Group';
        var $useTable = 'groups';

        var $hasAndBelongsToMany = array(
                'User' => array(
                        'className' => 'User',
                        'joinTable' => 'groups_users',
                        'foreignKey' => 'group_id',
                        'associationForeignKey' => 'user_id',
                        'unique' => true
                )
        );
}

I set up a something similar in user.php, although I think I'm right
in saying that the user model is irrelevant if I'm just accessing this
through the URL http://localhost/cakebeta/groups/index   Here's what I
get back:

Array
(
    [0] => Array
        (
            [Group] => Array
                (
                    [id] => 1
                    [name] => Administrators
                )

            [User] => Array
                (
                )
        )
......

Here is the data in my GROUPS_USERS table:

GROUP_ID        USER_ID
1       1
2       1
2       2
3       1
3       2
3       4

There should have been a user listed for group 1,  but the whole
[User] is blank.  I wondered whether the GROUPS_USERS table should
have a primary key,  so I made one across the two fields -- but no
joy.

Surely there must be a way to understand why the data is not getting
into the array. Maybe I need to try and debug through the api
somehow?  As I said,  I am beginning to think this must be something
to do with the fact that I'm using Firebird.

Regards,  villas
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to