title: How to fix: ERROR: column u0_.id does not exist
body: <p>I'm working with the API Platform and tried installing the <a href="https://api-platform.com/docs/core/jwt/" rel="nofollow noreferrer">LexikJWTAuthenticationBundle</a>. When I went to my API platform admin it shows me a server communication error and my console says:</p>
  
  <pre><code>ERROR:  column u0_.id does not exist at character 8
  </code></pre>
  
  <p>I googled it and found stackoverflow.com but found no solution for my specific problem.</p>
  
  <p>This is my User.php:</p>
  
  <pre><code>&lt;?php
  
  namespace App\Entity;
  
  use Doctrine\ORM\Mapping as ORM;
  use Symfony\Component\Security\Core\User\UserInterface;
  use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  use ApiPlatform\Core\Annotation\ApiResource;
  
  /**
   * @ApiResource()
   * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
   * @UniqueEntity(fields={"username"}, message="There is already an account with this username")
   */
  class user implements UserInterface, \Serializable
  {
      /**
       * @ORM\Id()
       * @ORM\GeneratedValue()
       * @ORM\Column(type="integer")
       */
      private $id;
  
      /**
       * @ORM\Column(type="string", length=255, unique=true)
       */
      private $email;
  
      /**
       * @ORM\Column(type="string", length=255, unique=true)
       */
      private $username;
  
      /**
       * @var string The hashed password
       * @ORM\Column(type="string")
       */
      private $password;
  
  
      public function getId(): ?int
      {
          return $this-&gt;id;
      }
  
      /**
       * A visual identifier that represents this user.
       *
       * @see UserInterface
       */
      public function getUsername(): string
      {
          return (string) $this-&gt;username;
      }
  
      public function setUsername(string $username): self
      {
          $this-&gt;username = $username;
  
          return $this;
      }
  
      public function getEmail(): ?string
      {
          return $this-&gt;email;
      }
  
      public function setEmail(string $email): self
      {
          $this-&gt;email = $email;
  
          return $this;
      }
  
      public function getRoles()
      {
          return [
              'ROLE_USER'
          ];
      }
  
      /**
       * @see UserInterface
       */
      public function getPassword(): string
      {
          return (string) $this-&gt;password;
      }
  
      public function setPassword(string $password): self
      {
          $this-&gt;password = $password;
  
          return $this;
      }
  
      /**
       * @see UserInterface
       */
      public function getSalt()
      {
      }
  
      /**
       * @see UserInterface
       */
      public function eraseCredentials()
      {
          // If you store any temporary, sensitive data on the user, clear it here
          // $this-&gt;plainPassword = null;
      }
  
      public function serialize()
      {
          return serialize([
              $this-&gt;id,
              $this-&gt;username,
              $this-&gt;email,
              $this-&gt;password
  
          ]);
      }
      public function unserialize($string)
      {
          list(
              $this-&gt;id,
              $this-&gt;username,
              $this-&gt;email,
              $this-&gt;password
              ) = unserialize($string, ['allowed_classes' =&gt; false]);
      }
  }
  </code></pre>
  
  <p>Here is the full error message:</p>
  
  <pre><code>db_1        | 2019-11-08 14:01:56.997 UTC [323] ERROR:  column u0_.id does not exist at character 8
  db_1        | 2019-11-08 14:01:56.997 UTC [323] STATEMENT:  SELECT u0_.id AS id_0, u0_.email AS email_1, u0_.username AS username_2, u0_.password AS password_3 FROM user u0_ ORDER BY u0_.id ASC LIMIT 30
  </code></pre>