I'm wondering if it is possible to use collection filtering, if the collection is based on a composite element.
An example,
The mapping:
Code:
<set name="ledgerLines" table="LEDGER_LINE" lazy="true" sort="natural">
<key column="ACCOUNT_ID"/>
<composite-element class="LedgerLineImpl">
<parent name="account"/>
<many-to-one name="transaction"
column="TRANSACTION_ID"
not-null="true"
class="TransactionImpl"/>
<property name="bookingSide" column="BOOKING_SIDE"/>
</composite-element>
</set>
Usage in a DAO is as follows (with an empty filter string):
Code:
List results = getSession().createFilter(account.getLedgerLines(), "").list();
The following exception is thrown:
Code:
org.hibernate.QueryException: collection of values in filter: this
All works fine if I simply retrieve the complete collection (account.getLedgerLines()), without filtering.
Does anyone have any idea?
Thanks a lot.