-->
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: Help with this Query
PostPosted: Thu Sep 30, 2004 2:25 am 
Newbie

Joined: Thu Sep 30, 2004 2:14 am
Posts: 3
Using Hibernate 2.1
I have the mapping document as below
---------------------------
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 2.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd">

<hibernate-mapping package="com.bellsouth.moquin">

<class name="Member" table="TEAM_MEMBER">
<id name="MEMBER_ID" type="int">
<generator class="native"/>
</id>

<property name="full_name" type="string"/>
<map name="weeklyTasks" lazy="true" table="WEEKLY_TASKS" sort="natural">
<key column="MEMBER_ID"/>
<index column="WEEK" type="string"/>
<element type="string" column="DUTIES"/>
</map>
</class>

</hibernate-mapping>
---------------------------
( I ve snipped some parts irrelevent to the context )
Essentially it is modeling a team, with each members given responsibilities for every week.

The Parent class has the team members personal data and then the map, inside will have the week-responsibilities relations.

1. How can I write a query that, given the week, will fetch the responsibilities of each team member for that week.

2. I wanted to use the value type for the inner week-responsibilities map. How will I write the mapping document for this ( using component ? )

3. Given the problem statement above, is there a better/natural mapping document

Thanks for reading
--sony


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.