-->
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: many-many mapping outside a class
PostPosted: Fri Jul 15, 2005 11:27 pm 
Newbie

Joined: Wed Jun 29, 2005 9:27 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

3.0:

Hi,

My Db model is like

FLOW:
FLOW_ID PK
FLOW_NAME
TIMEOUT

PROMPT:
PROMPT_ID PK
PROMPT_NAME

PROMPT_INFO:
PROMPT_ID PK, FK
LANG_ID PK
PROMPT_FILE
PROMPT_TEXT


FLOW_PROMPT:
FLOW_ID PK, FK
PROMPT_ID PK, FK


Class Prompt {

int promptId
String promptName
Map<PromptInfo> info // where the keys are integer LANG_ID
}

Class PromptInfo {

String promptFile
String promptText
}

If I have to query the PROMPT and PROMFT_INFO tables based on the PROMPT_ID from FLOW_PROMPT which in turn is based on FLOW_ID,
on which class would I need to create the hbm mapping file and how would the query look.
The result of the query should be Set<Prompt>
I do not want to put the many-many mapping in the Flow class

Thanks
Sudhir


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.