-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate feature request !!!
PostPosted: Tue Sep 26, 2006 10:19 am 
Beginner
Beginner

Joined: Sun Sep 24, 2006 11:48 am
Posts: 21
I think Hibernate should be made as easy to use as possible.......

Therefore I would like to suggest the following syntax for more complicated queries.....

Imagine you want to query local area that belong to a country, independet of the "wide area". But country is only references via a wide area and there is no direct link between local area and a country.

You can not add wide area as a restriction as the problem ist, that you want all wide areas....and you only need them to get to the county.....


Criteria c = session.createCriteria(LocalArea.class);
c.add(Restrictions.eq("wideArea", *));
c.add(Restrictions.eq("country", country));

-localArea
-wideArea
- country

What do you think?

I think such a syntax would definitely be cool! You also would not need to create additional tables for the linkage....


Last edited by forgotmyusernameagain2 on Tue Sep 26, 2006 10:27 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 10:26 am 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
you can place enhancement requests here http://opensource.atlassian.com/project ... board.jspa

but I don't get what you're trying to suggest as an improvement. You can already use Criteria like that.

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 2:11 pm 
Beginner
Beginner

Joined: Sun Sep 24, 2006 11:48 am
Posts: 21
kochcp wrote:
You can already use Criteria like that.


Have you got an example? Are you sure?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Sep 26, 2006 2:16 pm 
Expert
Expert

Joined: Fri Aug 19, 2005 2:11 pm
Posts: 628
Location: Cincinnati
I'll respond in the other thread. I read this thread before the other one and just assumed those were attributes

_________________
Chris

If you were at work doing this voluntarily, imagine what you'd want to see to answer a question.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 posts ] 

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.