-->
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: Criterion on a key and value of a map of simple objects
PostPosted: Mon Nov 14, 2005 6:19 pm 
Newbie

Joined: Wed Apr 13, 2005 8:10 am
Posts: 15
Hi all,
(hibernate 3.0)
I map a one-to-many to a Map of String keys and String values, and wish to create a criterion based on this Map, but have no clue as to how to do that:
Code:
<class name="Parent">
   ...   
  <map name="names" table="names">
    <key column="fk_parent_id"/>
    <map-key column="type" type="string"/>
    <element type="string" column="name"/>
  </map>
</parent>

now I need to query all parents with "names" of type "X" and name "Y":

Code:
session.createCriteria(Parent.class)
  add( ????????? );

Thanx in advance,
Ron


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.