Skip to content
This repository was archived by the owner on Feb 25, 2020. It is now read-only.

hasOne not automatically bound when calling $Model::find('list'); #4

@cdvrooman

Description

@cdvrooman

I'm trying to do this:

$this->Group->find('list');

and my SQL is coming out like this:

SELECT Group.id, Group.name, GroupPermission.* FROM groups AS Group WHERE 1 = 1

In permisssionable/models/behaviors/permissionable.php, when I debugged the $Model before and after this line of the beforeFind() function:

$this->_bind($Model, array( ... ));

the $Model did not and then did have a 'hasOne' binding to GroupPermission however for some reason it isn't being applied to the ->find('list') query.

I tried to do a $this->Group->find('all'); and that did work as expected.

I'm calling $this->Group from my users_controller where I have:

var $uses = array('User', 'Group');

I have User HABTM Group and Group HABTM User defined in the appropriate model files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions