title: How to filter based on properties of lazy load entities
body: <p>I have a table Member which as a lazy load entity User.</p>
  
  <pre><code>Member   User
  ------   ----
  id       id
  User     name 
  
  DetachedCriteria dc = DetachedCriteria.forClass(Member.class, "m");
  dc.setFetchMode("user",FetchMode.JOIN);
  dc.add(Restrictions.like("user.name", "alpha", MatchMode.ANYWHERE));
  Criteria criteria = dc.getExecutableCriteria(session.getSession());
  List&lt;Membership&gt; list = criteria.list();
  </code></pre>
  
  <p>It throws hibernate exception cannot resolve property user.name in member table.</p>
  
  <p>How to use restricitions of properties from a lazy load associated entity?</p>