-->
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.  [ 2 posts ] 
Author Message
 Post subject: Possible to return Dictionary from a query
PostPosted: Sat Sep 22, 2007 6:41 am 
Newbie

Joined: Sat Sep 22, 2007 5:42 am
Posts: 10
Hello!

Is it possible to make nhibernate return a dictionary or map as result of a query etc.? As I understand, now the return objects can either be of type IList(generic or not) or entity class.

I am having a scenario where I want to load a lot of data into memory and then efficently work with them. In this case it is about imorting from a database to antoher database.

Hibernate version:
latest
Mapping documents:
latest


Top
 Profile  
 
 Post subject: IDictionary
PostPosted: Wed Sep 26, 2007 4:53 am 
Newbie

Joined: Sat Sep 22, 2007 5:42 am
Posts: 10
Ok, I have read some more about my question.

I understand you can use the function setResultTransformer with CriteriaUtil.AliasToEntityMap as parameter.
What is the key in this Map? Can I tell hibernate which key to use for the map and what to load as value?


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