title: How do I get a list of items with Ebean using complex query
body: <p>I have 3 models, model for town, that has a field for regionId, model for region, that has a field for stateId.</p>
  
  <p>model for town:</p>
  
  <pre><code>@Entity
  @Table(name = "town")
  public class Town extends Model {
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "town_id_seq")
      private Integer id;
  
      @Column(name = "region_id")
      private Integer regionId;
      ...
  </code></pre>
  
  <p>model for region:</p>
  
  <pre><code>@Entity
  @Table(name = "region")
  public class Region extends Model {
  
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "region_id_seq")
      private Long id;
  
      @Column(name = "state_id", nullable = false)
      private Long stateId;
      ...
  </code></pre>
  
  <p>model for state:</p>
  
  <pre><code>@Entity
  @Table(name = "state")
  public class State extends Model {
      @Id
      @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "state_id_seq")
      private Integer id;
      ...
  </code></pre>
  
  <p>I need to get list of towns in specific state. In SQL I would do something like this:</p>
  
  <pre><code>select * from town join region on town.region_id = region.id 
  where region.state_id=15666
  </code></pre>
  
  <p>I did fetch of two tables</p>
  
  <pre><code>public static List&lt;Town&gt; findAllInState(Integer stateId) {
      return Ebean.find(Town.class).fetch("region").findList();
  }
  </code></pre>
  
  <p>but when I try to add <code>.where().eq("region.stateId", stateId)</code> it shows <code>BeanList size[0] hasMoreRows[false] list[]</code></p>
  
  <p>How can I get it using Ebean?</p>