Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p><em>Ebean is the underlying JPA implementation</em></p> </blockquote> <p>Ebean is not a JPA Implementation. Ebean has a little in common with the JPA standard. It looks a little similar, because it's annotations look similar to JPA's. </p> <p><strong>Cause of your problem: Ebean does not support fetch=... attribute on @ManyToMany annotation.</strong></p> <p>2 solutions:</p> <ol> <li><p>Remove fetch=... from annotation and instead use fetch() method on either the <code>play.db.ebean.Model.Finder&lt;I,T&gt;</code> object (which implements <code>com.avaje.ebean.Query&lt;T&gt;</code>) or the com.avaje.ebean.Ebean object.</p> <p>Problem is there are two separate persistent libraries here (play.db.ebean and com.avaje.ebean) and integration between them is a challenge and issue.<br> E.g. play.db.ebean.Model.Finder.fetch() method returns <code>com.avaje.ebean.Query&lt;T&gt;</code> rather than play.db.ebean.Model.Finder - which I find unhelpful as it takes you away from the play API Model helper. After calling fetch() apparently you can no longer use the Model.Finder methods - not much of a "helper" class at that point.<br> To be honest, I don't think the fetch functionality is a first class feature within Play API yet - best to defer to the Avaje API. </p> <p>Two examples of using fetch() from within the Avaje API:</p> <pre><code>// single SQL query with a fetch join List&lt;Order&gt; l0 = Ebean.find(Order.class) .fetch("customer") .findList(); </code></pre> <p>and</p> <pre><code>// two separate SQL queries List&lt;Order&gt; l0 = Ebean.find(Order.class) .fetch("customer", new FetchConfig().query()) .findList(); </code></pre> <p><strong>Note: the last release/update to Ebean (other that bug fixes) was 6 Nov 2010 - 2 full years ago. The uptake rate of Ebean is very low.</strong></p></li> <li><p>Switch to using a JPA 2.0 implementation within Play. The 2.0 release of JPA is very powerful indeed, is easy to use, and is very widely supported. It will probably mean the death of Ebean. Note that Play has added the following configuration feature into 2.0 (wasn't present in 1.1) - suggesting Play is moving towards fuller support for JPA from any provider. <a href="http://www.playframework.org/documentation/2.0/JavaJPA" rel="nofollow">http://www.playframework.org/documentation/2.0/JavaJPA</a></p> <p>Once you do this, stop using play.db classes and com.avaje classes - I suggest you use 100% javax.persistence classes.</p></li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload