-->
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.  [ 1 post ] 
Author Message
 Post subject: HQL for an object containing a map.
PostPosted: Mon Aug 29, 2005 1:48 pm 
Newbie

Joined: Wed May 11, 2005 4:25 pm
Posts: 5
Location: San Jose, CA
I have a calendar object that have holidays (a map) which is a mapping of hol_name and hol_date. A map from string indices to dates:

<map name="holidays" table="holidays">
<key column="id"/>
<index column="hol_name" type="string"/>
<element column="hol_date" type="date"/>
</map>


What does the HQL named query look like if I need to make a query which uses holiday name as an input variable parameter (:hol_name) and gets queried result as the corresponding date for the holiday?

What does the HQL named query look like if I need to make a query to get the holidays (a map) only, instead of the calendar object.

Thanks.


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

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.