-->
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.  [ 6 posts ] 
Author Message
 Post subject: Exclude specific data in SELECT
PostPosted: Mon Feb 06, 2006 3:35 am 
Newbie

Joined: Fri Jan 13, 2006 1:28 pm
Posts: 4
Location: Germany
I'd like to know if it is possible to exclude specific data (columns) when retrieving data via hibernate.

I know i could simply drop the according property from my mapping descriptor,
but what's about if i want to dynamically exclude properties?

My current work around is to "cleanup" the resulting object or list of objects,
but if you have thousands of results per query it's a very time expensive operation.

Any hints or guidance would be greatly appreciated!

_________________
Best regards Johannes


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 06, 2006 7:29 am 
Newbie

Joined: Fri Jan 13, 2006 1:28 pm
Posts: 4
Location: Germany
Nobody with some knowledge about my problem? :/

_________________
Best regards Johannes


Top
 Profile  
 
 Post subject:
PostPosted: Mon Feb 06, 2006 7:58 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
since you only waited approx 20 hrs to repost/reask i'll just wait a little longer (who knows how long) to answer...;)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 4:34 am 
Newbie

Joined: Fri Jan 13, 2006 1:28 pm
Posts: 4
Location: Germany
Someone out there with a similar problem?

It seems to be one of teh things hibernate does not really cover,
the dynamic exclusion of data when retrieving.

Before i asked i googled around and extensively searched the forum(s),
but however, no answer to my questions.

_________________
Best regards Johannes


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 4:41 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
it actually covers it *very* well.

did you look into:

scalar queries
select new syntax
criteria resulttransformer
lazy properties
etc.

remember that unless you are using (evil) lazy properties then you of course cannot get a *persistent* object that is "half-full"...how do you expect hibernate to figure out what it need to save/update for ya'

but with some of the above features you can atleast get a *transient* object you can use.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 07, 2006 5:20 am 
Newbie

Joined: Fri Jan 13, 2006 1:28 pm
Posts: 4
Location: Germany
Thanks, the keywords you gave me are near exactly what i was searching for!

I'm locked to massively use lazy properties because the resulting objects
will be transfered over RMI to the requesting client.
And i was unable to get out the Proxy references to get a persistent set of results.

I'll try to use custom more specific queries to solve my problem.

Thanks for your help max!

_________________
Best regards Johannes


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