-->
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: Field Selection from different tables: Criteria or HQL
PostPosted: Sun May 14, 2006 2:10 pm 
Newbie

Joined: Tue Apr 25, 2006 3:41 pm
Posts: 3
Location: Redmond, WA
I am working on a large database with multiple relations existing between entities. One set of relations is as shown below

Area (Many to One) ----->MarketMaster (Many to One) -----> Market
(Many to One) --> MarketCluster(Many to One) --->Region

Similarly Area table has lot of relation with many other tables.
Please clarify:

1. To cater to the fields, operators and values selected by UI, i shd dynamically generate queries. But criteria queries fetch objects as a whole and not individual fields. ("Projections" can be used to select fields, but for choosing Area.MarketMaster.Market.Marketcluster.Region.regionname, Can projections be used?

For example to select area name (From Area table), Market name (From Market table), which belongs to region EAST (From region table), how to use Projections?

2. Given the scenario of large db and catering to dynamic queries, is it better to use Criteria queries or HQL? How to fetch specific field values using Criterion API..

Please suggest..


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.