title: org.hibernate.QueryException: could not resolve property with column name already defined
body: <p>This is the first time I use SpringMVC+Hibernate, so forgive me if I asked a noob question.</p>
  
  <p>The relationship of database tables looks like this:
  <a href="https://i.stack.imgur.com/Y2RcB.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Y2RcB.jpg" alt="Text in red color are my tables"></a></p>
  
  <p>And what I want to implement is searching for <em>user_tasks</em> which belongs to some <em>user</em>. So in the implementation of UserRepository I wrote this:</p>
  
  <pre><code>@Repository("userTaskRepo")
  public class UserTaskRepoImpl extends AbstractDao&lt;Integer, UserTask&gt; implements UserTaskRepository {
  
      public List&lt;UserTask&gt; getByUserId(int userId, int startTaskId, int size) {
          List&lt;UserTask&gt; userTasks = getSession().createCriteria(UserTask.class)
                  .add(Restrictions.eq("user_id", userId))
                  .add(Restrictions.ge("task_id", startTaskId))
                  .setMaxResults(size)
                  .list();
          return userTasks;
      }
  }
  </code></pre>
  
  <p>and the related <em>UserTask</em> class are defined as follows:</p>
  
  <pre><code>@Entity
  @Table(name = "usertask")
  public class UserTask {
      //public enum TaskState {CLAIMED, FINISHED, EXPIRED};
      public static int TYPE_CLAIMED = 0;
      public static int TYPE_FINISHED = 1;
      public static int TYPE_EXPIRED = 2;
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      @Column(name = "id")
      private Integer id;
  
      @Column(name = "user_id", nullable = false)
      private Integer userId;
  
      @Column(name = "task_id", nullable = false)
      private Integer taskId;
  
      @Column(name = "curr_usermicrotask_id")
      private Integer currUserMicrotaskId;
  
      @Column(name = "state", nullable = false)
      private Integer state;
  
      //...some getters and setters
  }
  </code></pre>
  
  <p>Also, I have classes of <em>User</em> and <em>Task</em> defined.</p>
  
  <p>However, error occurs when I tried to call the function in the UserTaskRepoImpl
  exception</p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.hibernate.QueryException: could not resolve property: user_id of: edu.inlab.models.UserTask
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:979)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  </code></pre>
  
  <p>Could anyone figure out why this happened?
  Thanks in advance!</p>