-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: HQL query by property of component contained in an index
PostPosted: Thu Feb 12, 2004 2:19 pm 
Newbie

Joined: Fri Feb 06, 2004 9:05 am
Posts: 7
Location: Russia, Moscow
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


Top
 Profile  
 
 Post subject: i have the same problem
PostPosted: Tue Feb 15, 2005 1:26 am 
Newbie

Joined: Tue Feb 08, 2005 2:26 pm
Posts: 4
help me thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.