Hibernate version:
3.1 b1
Name and version of the database you are using:
MySQL
Mapping documents:
<hibernate-mapping>
<union-subclass name="pkg.User" table="User" extends="Entity">
<property name="name" unique="true"/>
<set name="something" table="UserSomething" cascade="persist,merge,save-update">
<key column="userId"/>
<many-to-many column="somethingId" class="pkg.Something"/>
<filter name="currentUser"
condition="FROM Extra e WHERE e.:user = User.this AND e.target = Portal.this AND e.include = 1"/>
</set>
</union-subclass>
<filter-def name="currentUser">
<filter-param name="user" type="pkg.User"/>
</filter-def>
</hibernate-mapping>
This is a followup question to:
http://forum.hibernate.org/viewtopic.php?t=949142
Okay, my pseudo attempt above might show what I'm trying to do. I want to create a filter that joins to a different table (Extra) and joins on Extra.user = the User and Extra.target = the portal in the set in question and then the real filter is that e.include = 1.
How would this be done correctly?
Thanks.