JPA: is there any annotation with the same behaviour as Hibernate @Where?
<p>I'm working with JPA annotations, and I'd like to use an annotation that behaves the same as the Hibernate @Where.</p>

<p>I want to map an entity from a table, but I have to do add a where clause in every query that uses that table.</p>

<p>This is my case: my table has a column deleted, and when this column is 1, this row should not be appear.</p>

<p>If I'd use Hibernate hbm, this is resolved in this way:</p>

<pre><code>&lt;hibernate-mapping&gt;
     &lt;class 
        name="MyClass" 
        table="MyTable" 
        dynamic-insert="false" 
        dynamic-update="false"
        where="deleted = 0"&gt;
&lt;/hibernate-mapping&gt;
</code></pre>

<p>But I don't know how to do this only with JPA.</p>

<p>The only idea that comes to me is to extend the JpaRepository of this entity, but my problem is that there is another entity that uses this one, so extending the JpaRepository of the first entity is useless.</p>

<p>Using the Where clause in the column should work, but I'm trying to find a way to do this without Hibernate.</p>

<p>Anyone have any idea?</p>