-->
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.  [ 3 posts ] 
Author Message
 Post subject: extend criteria api to return maps
PostPosted: Mon Feb 23, 2004 5:28 am 
Regular
Regular

Joined: Thu Dec 11, 2003 4:14 pm
Posts: 86
Location: Hibernate 3 + annotations, Oracle 9i, PostgreSQL 8.0, Java 1.5.0
Hello!

After trying some things with hibernate, it comes to me, that i miss a feature.

The only access to the result set has to be done through list() (for now), but often i would like to get a set of records, and access them by some custom key.

There are not soo much changes to such a table, and so i would like to read this records only if there are changes in the database, exactly the same way as list() works.

I have looked into the criteria api and loader now, and it looks like it is some work to do, to make the cache accept something else than lists.

I know, i could create my map by processing the list in the application, but then, this has to be done for every transaction.
Even if the result from list() comes from the cache, to popuplate the map on every transaction might be too expensive.

I would like to try to implement a function like map(comparator), but only if it make its way into hibernate.


Do you think this is use- (and doable)?


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 24, 2004 4:44 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Post it to JIRA, someone will have a look.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Fri Feb 27, 2004 4:25 am 
Regular
Regular

Joined: Thu Dec 11, 2003 4:14 pm
Posts: 86
Location: Hibernate 3 + annotations, Oracle 9i, PostgreSQL 8.0, Java 1.5.0
http://opensource.atlassian.com/project ... key=HB-743

With some patch attached.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.