-->
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: QL - relations/mapping
PostPosted: Thu May 31, 2007 4:14 am 
Newbie

Joined: Thu May 31, 2007 4:02 am
Posts: 2
I'm quite new to all these EJB3 annotations.
At present we have to redesign our application. In general, what we want to achieve is storing documents with multi-lingual, versioned dictionaries.

DataBase desgin: (very simplified)
Documents table:
DOC_ID ..... some other doc columns DICT_ID
122 .......... 12

Dictionaries table:
DICT_ID DICT_LOCALE DICT_VALUE
12 en_GB british value
12 de_DE german value

(Dictionary is also versioned - we store versions in this table too. But to simplify, it is not important.)

The question is how to design entity beans in order to be able to write EJB query fetching document together with dictionary value for proper locale:
getDocument(docId, locale).

We have a workaround, getting the document, and then fetching the dictionary for it, but it's inefficient. We'd like to fetch millions of documents in the future.

Any suggestions for these two entity beans and EJB-query getting the document? Maybe the DB design is wrong?

We tried to use @OneToMany annotation and LEFT JOIN in the query, but we are getting PersistanceExpetion: "could not get a field value by reflection getter"


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.