title: Querydsl entity inheritance query with join
body: <p>I have three entities. User(parent)</p>
  
  <pre><code>@Entity
  @Inheritance(strategy = InheritanceType.JOINED)
  @DiscriminatorColumn(name = "user_type")
  @Table(name = "userinfo")
  @SequenceGenerator(name = "userInfoUserIdSeq", initialValue = 1, allocationSize = 100, sequenceName = "userinfo_user_id_seq")
  public abstract class UserInfo {
  
  public static final String EDITOR = "E";
  public static final String TALENT = "T";
  
  @Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "userInfoUserIdSeq")
  @Column(name = "user_id")
  private Long id;
  ...
  </code></pre>
  
  <p>Editor(child)</p>
  
  <pre><code>@Entity
  @DiscriminatorValue(UserInfo.EDITOR)
  @Table(name = "editors")
  public class Editor extends UserInfo { ....
  </code></pre>
  
  <p>Journalist(child)</p>
  
  <pre><code>@Entity
  @DiscriminatorValue(UserInfo.TALENT)
  @Table(name = "talent")
  public class Talent extends UserInfo { .....
  </code></pre>
  
  <p>I have the following query that isn't working, written on querydsl</p>
  
  <pre><code>    QUserInfo userInfo = QUserInfo.userInfo;
      text = "%"  + text + "%";
      QTalent talent = QTalent.talent;
      QEditor editor = QEditor.editor;
      SearchResults&lt;UserInfo&gt; results = query.from(userInfo).leftJoin(userInfo, talent._super)
              .leftJoin(userInfo, editor._super).where( .....
  </code></pre>
  
  <p>I've got the following stacktrace:</p>
  
  <pre><code>     at            com.mysema.query.jpa.impl.AbstractJPAQuery.createQuery(AbstractJPAQuery.java:127)
      at com.mysema.query.jpa.impl.AbstractJPAQuery.listResults(AbstractJPAQuery.java:261)
      at com.washpost.talent.dao.implementation.UserInfoDaoImpl.findAllUsersByNamesAndEmails(UserInfoDaoImpl.java:33)
      ... 113 more
  Caused by: org.hibernate.hql.internal.ast.QuerySyntaxException: Path expected for join! [select count(userInfo)
  from com.washpost.talent.model.UserInfo userInfo
    left join treat(userInfo as Talent) as talent
    left join treat(userInfo as Editor) as editor
  where ....
  </code></pre>
  
  <p>I can not understand why my joins is not working</p>