title: Spring Data JPA query doesn't work, column does not exists
body: <p>I use spring data jpa in my web-app, i have entity user</p>
  
  <pre><code>@Entity
  public class User implements Serializable {
      private static final long serialVersionUID = 1L;
  
      private Long id;
      private String password;
      private String email;
      private Boolean enabled;
      private String name;
      private String lastname;
      private String userRole;
  
      public User() {
      }
  
      public User(String password, String email, Boolean enabled, String name, String lastname, String userRole) {
          this.password = password;
          this.email = email;
          this.enabled = enabled;
          this.name = name;
          this.lastname = lastname;
          this.userRole = userRole;
      }
  
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO, generator = "users_id_seq")
      @SequenceGenerator(name="users_id_seq", sequenceName="users_id_seq", allocationSize = 1)
      @Column(name = "id", nullable = false)
          public Long getId() {
          return id;
      }
  
   //Other columns
  }
  </code></pre>
  
  <p>And i have UserRepository interface which extends CrudRepository.
  When i call method findAll in my Controller, I get this error </p>
  
  <pre><code>01-May-2016 22:45:58.674 WARN [http-nio-8080-exec-3] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions SQL Error: 0, SQLState: 42703
  01-May-2016 22:45:58.675 ERROR [http-nio-8080-exec-3] org.hibernate.engine.jdbc.spi.SqlExceptionHelper.logExceptions Error: column user0_.id does not exist
    Position: 8
  </code></pre>
  
  <p>My spring-config.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tx="http://www.springframework.org/schema/tx"
         xmlns:jpa="http://www.springframework.org/schema/data/jpa"
  
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"&gt;
  
      &lt;jpa:repositories base-package="com.birthright.repository"/&gt;
  
      &lt;bean id="myEmf" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="packagesToScan" value="com.birthright.entity"/&gt;
          &lt;property name="jpaVendorAdapter"&gt;
              &lt;bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"/&gt;
          &lt;/property&gt;
          &lt;property name="jpaProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.dialect"&gt;org.hibernate.dialect.PostgreSQL9Dialect&lt;/prop&gt;
                  &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;tx:annotation-driven/&gt;
  
      &lt;bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
          &lt;property name="driverClassName" value="org.postgresql.Driver"/&gt;
          &lt;property name="url" value="jdbc:postgresql://localhost:5432/AutoService"/&gt;
          &lt;property name="username" value="postgres"/&gt;
          &lt;property name="password" value="root"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"&gt;
          &lt;property name="entityManagerFactory" ref="myEmf"/&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>My table in postgresql</p>
  
  <pre><code>CREATE TABLE public."user"
  (
    id integer NOT NULL DEFAULT nextval('users_id_seq'::regclass),
    password character varying,
    email character varying,
    enabled boolean,
    name character varying,
    lastname character varying,
    user_role character varying,
    CONSTRAINT users_pkey PRIMARY KEY (id)
  )
  </code></pre>