title: How to join multiple tables in HQL
body: <p>I Have this entity classes:</p>
  
  <pre><code>public class Work implements java.io.Serializable {
  
  private Integer workId;
  private User userByCreateBy;
  private User userByUpdateBy;
  private Long studyId;
  private String name;
  private byte panelType;
  private byte status;
  private Date createDate;
  private Date updateDate;
  private Set&lt;Task&gt; tasks = new HashSet&lt;Task&gt;(0);
  
  public Work() {
  }
  </code></pre>
  
  <p>}</p>
  
  <pre><code>private Integer taskId;
  private User userByCompleteBy;
  private User userByExecutedBy;
  private Work work;
  private byte type;
  private Date startDate;
  private Date endDate;
  private byte status;
  private Date updateDate;
  private Forecast forecast;
  private Set&lt;ForecastOutput&gt; forecastOutputs = new HashSet&lt;ForecastOutput&gt;(0);
  private MonitorLottery monitorLottery;
  private QprMonitorLotteryArea qprMonitorLotteryArea;
  private Set&lt;QprMonitorLotteryOutput&gt; qprMonitorLotteryOutputs = new HashSet&lt;QprMonitorLotteryOutput&gt;(0);
  private Set&lt;ForecastCellafter740&gt; forecastCellafter740s = new HashSet&lt;ForecastCellafter740&gt;(0);
  private Set&lt;QprMonitorLotteryResult&gt; qprMonitorLotteryResults = new HashSet&lt;QprMonitorLotteryResult&gt;(0);
  private Set&lt;AnswerDataOutput&gt; answerDataOutputs = new HashSet&lt;AnswerDataOutput&gt;(0);
  private QprMonitorLottery qprMonitorLottery;
  private AnswerDataCheck answerDataCheck;
  
  public Task() {
  }
  </code></pre>
  
  <p>}</p>
  
  <p>public class User implements java.io.Serializable {</p>
  
  <pre><code>private Integer userId;
  private String userName;
  private String password;
  private String name;
  private String email;
  private byte authority;
  private Date lastLogin;
  private Date passwordChangeDate;
  private byte status;
  private Integer createBy;
  private Integer updateBy;
  private Date createDate;
  private Date updateDate;
  private Set&lt;MasterFile&gt; masterFiles = new HashSet&lt;MasterFile&gt;(0);
  private Set&lt;Task&gt; tasksForCompleteBy = new HashSet&lt;Task&gt;(0);
  private Set&lt;Work&gt; worksForCreateBy = new HashSet&lt;Work&gt;(0);
  private Set&lt;Work&gt; worksForUpdateBy = new HashSet&lt;Work&gt;(0);
  private Set&lt;Task&gt; tasksForExecutedBy = new HashSet&lt;Task&gt;(0);
  
  public User() {
  }
  </code></pre>
  
  <p>}</p>
  
  <p>I want to join this tables using hql and get the details of username,workname,task.type,task.status etc.. I have done this code</p>
  
  <pre><code> StringBuilder dataQuery = new StringBuilder("select new com.web.main.view.WorkView("
          + "w.workId, "
          + "w.studyId, "
          + "w.name, "
          + "w.panelType, "
          + "t.type, "
          + "t.status, "
          + "u.user_name,"
          + "w.createDate, "
          + "w.updateDate, "
          + "t.startDate, "           
          + "t.endDate ) "
          + "from Work w  left join w.tasks t  left join w.user u where u.user_Id = w.create_by and w.status!=:status");    
  </code></pre>
  
  <p>But it is given  the error  </p>
  
  <p>HTTP Status 500 - Request processing failed; nested exception is java.lang.IllegalArgumentException: org.hibernate.QueryException: could not resolve property: user of, </p>
  
  <p>What will be the issue am I doing something wrong</p>