Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting "AclNode::node() - Couldn't find Aros node" error when saving associated entities with aliases #165

Open
ricardoaranha96 opened this issue Sep 17, 2020 · 2 comments

Comments

@ricardoaranha96
Copy link

ricardoaranha96 commented Sep 17, 2020

Complete error message: AclNode::node() - Couldn't find Aros node identified by "Array ( [Aros0.model] => Clients [Aros0.foreign_key] => 6 ) "

I am trying to save a Proposal entity associated with the User entity by the alias "Clients":

$this->belongsTo('Sellers', [
    'foreignKey' => 'seller_user_id',
    'className' => 'Users'
]);
$this->belongsTo('Clients', [
    'foreignKey' => 'client_user_id',
    'className' => 'Users',
]);

This user that I am trying to save already exists in the aros table but with the model "Users".

The Acl plugin is supposed to support this kind of configuration or is it a bug?

@rchavik
Copy link
Member

rchavik commented Sep 18, 2020

I think you would need to create real Client class and set it up as an Acl requester.

@ricardoaranha96
Copy link
Author

I think you would need to create real Client class and set it up as an Acl requester.

I didn't have time to try this during the week, but I believe that your suggestion would create a new aro of the same user but with the model field as "Clients". Am I right? If so, is there a way to keep this alias on the relationship but configure Acl to use the "className" instead of the alias?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants