I can't include a filter to a one-to-one assocation in my .hbm.xml file.
It's working for one-to-many associations: <bag name="subList" cascade="all,delete-orphan" lazy="false" inverse="true"> <key column="ID"/> <one-to-many entity-name="TestSubList"/> <filter name="FILTER" condition=":filterAttr = FILTER"/> </bag>
<filter-def name="FILTER"> <filter-param name="filterAttr"/> </filter-def>
... but I can't include a filter to a one-to-one association: <one-to-one name="oneToOne" entity-name="TestOneToOne" cascade="save-update"> <filter name="FILTER" condition=":filterAttr = FILTER"/> </one-to-one>
--> I get this message: "The content of element type "one-to-one" must match "(meta*,formula*)"."
Is there a workaround for this problem?
|