Yes, perhaps with a simple workaround. I pointed out the @AdditionalCriteria annotation as follows:
@AdditionalCriteria(":disableDeletedFeature = 1 or this.isDeleted = false")
and set the default property value for the disable flag in persistence.xml:
<property name="disableDeletedFeature" value="0"/>
therefore, filtering is enabled by default, but you can easily disable it at the EntityManager level as follows:
entityManager.setProperty("disableDeletedFeature", 1);
Everything works fine, hope this helps!
Kristof jozsa
source share