title: Hibernate HQL left join with null values
body: <p>I have those 2 tables</p>
  
  <p>table A with columns: id, description, title</p>
  
  <p>table B with columns: id, user, authent, rel_id</p>
  
  <p>table B rel_id is FK on table A.id (One to One)</p>
  
  <pre><code>==&gt; Table A Entity
  ==&gt; @JoinColumn(name = "REL_ID", nullable = false, referencedColumnName = "ID")
      private ObjectTableA objA;
  </code></pre>
  
  <p>now, i want to have with hql the same result as Sql :</p>
  
  <pre><code>select *
  from tableA a
  left outer join tableB b on a.id = b.REL_ID and b.user='ADMIN';
  </code></pre>
  
  <p>which include all table A row ONCE and table B references (including null)</p>
  
  <p>eg.</p>
  
  <pre><code>id  -  description  -  title  -   id   - user    -  authent  -  rel_id
  1   -  des1         -  tit1   -   6    - admin   -  4        -  5
  2   -  des2         -  tit2   -   null - null    -  null     - null
  </code></pre>
  
  <p>The problem with hibernate HQL and the second row above (id=2) is that I cannot reach table A row data by doing EntityB.rel_id because rel_id object(whose type is EntityA) is null thus pointing to nothing which means I cannot show required data on my view!
  How can I overcome this problem? thanks!  </p>