title: complicated sql query returning empty result
body: <p>My database looks like this</p>
  
  <pre><code>tickets table
  -------------
  ticket_id
  title
  description
  department_id
  status_id
  priority_id
  assignee_id
  creator_id
  
  departments table
  ------------------
  dep_id
  dep_name
  
  status table
  ------------
  status_id
  status_name
  
  priority table
  ---------------
  pr_id
  pr_name
  
  users table
  -----------
  u_id
  username
  password
  salt
  email
  firstName
  lastName
  department_id
  userlevel_id
  
  userlevels table
  -----------------
  ul_id
  ul_name
  </code></pre>
  
  <p>I need to load all tickets given the asignee id. My query looks like this</p>
  
  <pre><code>SQLQuery q = q.createSQLQuery("SELECT t.*,d.*,s.*,p.*,u.*,a.* FROM tickets t, departments d, status s, priority p, users u, attachments a WHERE t.department_id=d.dep_id AND t.status_id=s.stat_id AND t.priority_id=p.pr_id AND t.assignee_id=u.u_id AND t.creator_id=u.u_id AND t.tick_id=a.ticket_id AND assignee_id=?");
  
      q.setInt(0, some_valid_assignee_id);
      List&lt;Object&gt; result = q.list();
  </code></pre>
  
  <p>But it's returning an empty object list. Can anyone point me in the right direction, thanks!!</p>