Note that there are some explanatory texts on larger screens.

plurals
  1. POQueryDsl, combining standard JPA and Hibernate's - class level @Where annotations?
    primarykey
    data
    text
    <p>I'm wondering if I could team up hibernate annotations, and particularly those class level annotations, with standard JPA annotations in QueryDsl. Like so...</p> <pre><code> @javax.persistence.Entity @org.hibernate.annotations.Where(clause="someProperty = (SELECT ....)") @javax.persistence.Table(name="anyname") public class SomeClass {... } </code></pre> <p>Currently we use JPA annotations only but we must incorporate some hibernate annotations as well.</p> <p>Is is safe to replace "JPAAnnotationProcessor" by "HibernateAnnotationProcessor" in the apt plug-in configuration? *)</p> <pre><code> &lt;plugin&gt; &lt;groupId&gt;com.mysema.maven&lt;/groupId&gt; &lt;artifactId&gt;apt-maven-plugin&lt;/artifactId&gt; &lt;version&gt;1.0.8&lt;/version&gt; &lt;executions&gt; &lt;execution&gt; &lt;phase&gt;generate-sources&lt;/phase&gt; &lt;goals&gt; &lt;goal&gt;process&lt;/goal&gt; &lt;/goals&gt; &lt;configuration&gt; &lt;outputDirectory&gt;target/generated-sources/java&lt;/outputDirectory&gt; &lt;processor&gt;com.mysema.query.apt.hibernate.HibernateAnnotationProcessor&lt;/processor&gt; &lt;sourceDirectory&gt;src/gen/java&lt;/sourceDirectory&gt; &lt;/configuration&gt; &lt;/execution&gt; &lt;/executions&gt; &lt;/plugin&gt; </code></pre> <p>*) However after replacing the annotation-processor to "HibernateAnnotationProcessor" I couldn't notice any change in the resulting JPA Query. Is it because I'm still using JPA which apparently doesn't acknowledge any hibernate specifics?</p> <pre><code> JPAQuery query = new JPAQuery (this.emf.createEntityManager()); </code></pre> <p>Do I need to switch to Hibernate Session as well? </p>
    singulars
    1. This table or related slice is empty.
    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.
 

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