Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert Botashev committed Oct 11, 2021
1 parent a65af79 commit 903f59d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/src/Controller/ClientController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function index(UserInterface $user, ClientRepository $clientRepository)
if (in_array('ADMIN', $user->getRoles())) {
$clients = $clientRepository->findAll();
} else {
$clients = $clientRepository->findBy(['userId' => $user->getId()]);
$clients = $clientRepository->findBy(['user' => $user->getId()]);
}

return $this->render('client/index.html.twig', [
Expand Down
2 changes: 1 addition & 1 deletion app/src/Entity/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class User implements UserInterface, PasswordAuthenticatedUserInterface
private $password;

/**
* @ORM\OneToMany(targetEntity=Client::class, mappedBy="userId", orphanRemoval=true)
* @ORM\OneToMany(targetEntity=Client::class, mappedBy="user", orphanRemoval=true)
*/
private $clients;

Expand Down

0 comments on commit 903f59d

Please sign in to comment.