-->
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: Projection result on @IndexedEmbedded collection field
PostPosted: Wed Apr 30, 2008 7:10 am 
Newbie

Joined: Wed Apr 02, 2008 5:22 am
Posts: 6
Hi,

I have a User entity containing a List of Roles. I'm Indexing the User and have a @IndexedEmbedded on the List<Role> attribute, and a @Field on the Role.name. In the generated User index I have multiple role.name fields for each role the user has.

I'd like to be able to perform a Projection search on the index which returns the role name values held in the index. Is this possible? I could just return the entities themselves, but I'd really prefer to return a Projection.

Any suggestions much appreciated.

Cheers,

Anton


Top
 Profile  
 
 Post subject:
PostPosted: Wed Apr 30, 2008 10:38 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi Anton,

As far as I know the type of projection you are after is currently not possible. At the moment the value of the first added field will be returned. I am not sure right now whether it would be possible at all. Maybe you should open a Jira issue for this?

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 02, 2008 7:58 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
What do you want to return exactly? The first role, all the roles and how?

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 04, 2008 3:40 am 
Newbie

Joined: Thu Aug 28, 2008 12:13 pm
Posts: 9
Location: Heilbronn, Germany
I guess he wants to return all roles. I am in a similiar situation an need to get all elements of a Set return via projection.

Is there any new development on having such a feature? Or is there some code example someone could provide to achieve such a thing?

Regards,
Martin


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.