-->
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: Mapping array of objects
PostPosted: Thu Feb 04, 2010 12:48 pm 
Newbie

Joined: Thu Feb 04, 2010 12:40 pm
Posts: 1
I have a question regarding the result transformer and mapping of an array.

(ex).
I have a view that returns records as below.
id Image
---------------
1 Blob1
1 Blob2
2 Blob3

I have a java object that has the id and Image. The image atrribute is defined as an array of blobs. In the above case, I want hibernate to return me two objects. The first one with an id - 1 and images array containing 2 blobs and the second object with id - 2 with one blob in the array.

I am using Criteria API and applying the DISTINCT_ROOT_ENTITY transformer.

I would like to know if retrieving the results as per the above requirement possible in Hibernate?If so, how should the hbm mapping for images blob array look like?

Thanks in advance.


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.