Since you are not following the naming conventions in ORM, you need to change your has_many
declaration:
protected $_has_many = array(
'user' => array('through' => 'user_permission'),
'permissiondeny' => array('model' => 'user', 'through' => 'user_permissiondeny','foreign_key' => 'permissiondeny_id', 'far_key' => 'permission_id'),
'role' => array('through' => 'role_permission'),
);
note the far_key
part, you need to specify the name of the column that you'll be looking for. may it be user_id
, role_id
, permission_id
, etc