Hibernate version: 3.2.2
Mapping documents:
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping package="customer">
<class name="Customer" table="CUSTOMER" schema="SCHEMA">
[...]
<filter name="softDeleteFilter" condition="DELETED_S != 'Y'">
</filter>
</class>
</hibernate-mapping>
Code:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<filter-def name="softDeleteFilter" />
</hibernate-mapping>
The QuestionI'm trying to put a filter on all my Classes, but in a maintainable fashion.
Is there any way I could write
Code:
<filter-def name="softDeleteFilter" condition="DELETED_S != 'Y'" />
or something similar that let's me centralise the condition?
Writing the condition in every class would be a solution, but since I have +50 different classes, it would be a pain to maintain.