I found what was causing the issue I'm just unsure of what to do next
I had a look at the parsed has_many() relationships array in the privileges model.
Quote: [user] => Array
(
[class] => user
[other_field] => privilege
[join_self_as] => privilege
[join_other_as] => user
)
The model is terribly basic,
Code:
class Privileges extends DataMapper {
var $has_many = array("user");
function Privileges()
{
parent::DataMapper();
}
}
And again this is the relationship from the user model
Quote: [privileges] => Array
(
[class] => privileges
[other_field] => user
[join_self_as] => user
[join_other_as] => privileges
)
from
Code:
class User extends DataMapper {
var $has_many = array("history","group","privileges");
function User()
{
parent::DataMapper();
}
}
So, privileges has become privilege. To test this I renamed all cases of the plural (filename, class name, method, references to privileges in other models) to a singular and it works fine now.
So yea, any ideas on that one?
I could define that rest of that relationship for example
privileges model
var $has_many = array("user" => array('class' => 'user', 'other_field' => 'privileges'));
But that of course means the relationship table needs privileges_id instead of privilege_id
@OverZelous
Does that FAQ still apply? I read it but not 100% sure.