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: setProjection("xyz.abc" and everything else) ResultTransform
PostPosted: Mon Nov 14, 2011 11:58 am 
Pro
Pro

Joined: Wed Nov 05, 2003 7:22 pm
Posts: 211
Hi,

Let's say I have a query against Lucene that returns something like
"id"
"title"
"network.id"
"user.address.city"

I want to transform this to a bean with setters for
"id"
"title"
"networkId"
"city"

I'm just wondering how/if it's possible to efficiently deal with situations where you have to project all the values that map straight to a bean and translate some
that don't match properly to a setter method.

automatic
"id"->"id"
"title"->"title"

specified
"network.id"->"network"
"user.address.city"->"city"


Top
 Profile  
 
 Post subject: Re: setProjection("xyz.abc" and everything else) ResultTransform
PostPosted: Tue Nov 15, 2011 6:01 am 
Hibernate Team
Hibernate Team

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

I would say you are after Projection in combination with a result transformer - http://docs.jboss.org/hibernate/stable/ ... e/#d0e5174

--Hardy


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.