-->
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 not select all columns with hibernate?
PostPosted: Tue Mar 24, 2009 6:49 am 
Newbie

Joined: Tue Mar 24, 2009 6:35 am
Posts: 3
greetings,

I have a table with a blob column. A problem has just arisen when I want to get a list of (business) objects from that table. The Blob's are also selected, what causes an overload of data. I would like to select all data from the table except the Blob.
Now off course it's possible to put the blob in another table. Although I'm wandering if this is possible:
I would like to get a list of (business) objects from that table, without selecting the blob column and without using HQL.
The goal is to continue working with my business objects and so let hibernate create it without using HQL.
Is there a way to do this in the mapping file (xml) or by giving extra restrictions in the search criteria (NOT HQL)?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 24, 2009 7:42 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
I think specifying lazy="true" for that blob property in ur mapping should do ur thing. So the property will be fetched from DB only when the instance variable is first accessed.

_________________
Regards,
Litty Preeth


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.