Hi!
It's my mapping:
Code:
<class name="Subscription">
...
<map name="accounts">
<key column="subscription_id"/>
<composite-index class="com.orionbilling.common.DateInterval">
<key-property name="start" column="start_date"/>
<key-property name="end" column="end_date"/>
</composite-index>
<one-to-many type="Account"/>
</map>
</class>
Is it possible to write HQL query somthing like:
Code:
select s from Subscription join s.accounts account where index(account).start < :date and index(account).end > :date and account = :account
?
I.e. I need to retrieve all Subscriptions that have appropriate
account associated with Subscription at moment
date
Den