Skip to content

Commit

Permalink
Fixed: Role Demo: changing only role's description fails #50
Browse files Browse the repository at this point in the history
  • Loading branch information
olegkrivtsov committed Jul 12, 2018
1 parent 255ea9c commit e839d5b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion roledemo/module/User/src/Entity/Permission.php
Expand Up @@ -34,7 +34,7 @@ class Permission
protected $dateCreated;

/**
* @ORM\ManyToMany(targetEntity="User\Entity\Role", inversedBy="permissions")
* @ORM\ManyToMany(targetEntity="User\Entity\Role", mappedBy="permissions")
* @ORM\JoinTable(name="role_permission",
* joinColumns={@ORM\JoinColumn(name="permission_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id")}
Expand Down
2 changes: 1 addition & 1 deletion roledemo/module/User/src/Entity/Role.php
Expand Up @@ -52,7 +52,7 @@ class Role
protected $childRoles;

/**
* @ORM\ManyToMany(targetEntity="User\Entity\Permission", mappedBy="roles")
* @ORM\ManyToMany(targetEntity="User\Entity\Permission", inversedBy="roles")
* @ORM\JoinTable(name="role_permission",
* joinColumns={@ORM\JoinColumn(name="role_id", referencedColumnName="id")},
* inverseJoinColumns={@ORM\JoinColumn(name="permission_id", referencedColumnName="id")}
Expand Down
1 change: 0 additions & 1 deletion roledemo/module/User/src/Service/RoleManager.php
Expand Up @@ -109,7 +109,6 @@ public function updateRole($role, $data)
}
}

$this->entityManager->persist($role);
$this->entityManager->flush();

// Reload RBAC container.
Expand Down

0 comments on commit e839d5b

Please sign in to comment.