title: Inner join in play framework ebean
body: <p>I have a query which i want to write in my Product model</p>
  
  <pre><code>select * from shop inner join product on product.shops_id=shop.id where product.name=keyword
  </code></pre>
  
  <p><strong>Shop.java</strong></p>
  
  <pre><code>public class Shop extends Model {
  
      @Id
      @SequenceGenerator(name="shop_gen", sequenceName="shop_id_seq", allocationSize=1)
      @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="shop_gen")
      @Column(name="id")
      public Long id;
  
      @Required
      public String name;
  
      @Required
      public String addressLine1;
  
      public String addressLine2;
  
      public String addressLine3;
  
      @Required
      public String city;
  
      @Required
      public String town;
  
      @Required
      public String phoneNumber;
  
      @OneToMany(mappedBy = "shops",cascade = CascadeType.REMOVE)
      public List&lt;Product&gt; products=new ArrayList&lt;&gt;();
  
  
      @Required
      @OneToOne
      public String category;
  
      @Lob
      @Column(name = "shop_pic")
      public  byte[] shop_pic;
  
  
      @ManyToOne
      @Required
      public User owner;
  
  }
  </code></pre>
  
  <p><strong>Product.java</strong></p>
  
  <pre><code>public class Product extends Model {
     @Id
      @SequenceGenerator(name="product_gen", sequenceName="product_id_seq", allocationSize=1)
      @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="product_gen")
      @Column(name="id")
      public Long id;
      @Required
      public String name;
      @Required
      public Float price;
      @OneToOne
      @Required
      public String category;
      @ManyToOne
      public Shop shops;
  }
  </code></pre>
  
  <p>My main aim is to find list of shops which has a particular product. </p>
  
  <p>where keyword change everytime.
  i have referred to similar question  but dint understand any of them.
  Any help would be appreciated</p>