Hi again, I have simple relation (typical tree):
$this->hasManyToMany(
"id",
"App\Model\UserRoleHasParentUserRole",
"user_role_id",
"parent_user_role_id",
"App\Model\UserRole",
"id",
array( 'alias' => 'parentRoles')
);
When I want to show, it works:
$r = UserRole::findFirst();
dump($r->parentRoles);
But saving not:
$new = [];
$new[] = UserRole::find(['id' => 4]);
$r->parentRoles = $new;
$r->save();
I can't even set "parentRoles" property value. Do I need reflection?