-->
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: Lazily loading the blob field in the model
PostPosted: Thu Jul 12, 2007 3:29 pm 
Newbie

Joined: Mon Jul 09, 2007 1:43 pm
Posts: 1
Location: new jersey
I am new to hibernate. I am running in some problem here. I hope someone out there will help me !!!!!

Here is the situation. I have a hibernate model object that has a byte[] property to store a blob column in database table. Actually I want to run a criteria api to do search in that table. My requirement is, I have to display other columns in that table and simultaneously I should be able to retrieve the blob for one or two rows on demand. But everytime I do a search, my development box hangs and throws the "out of memory" error. Since the blob is pretty huge that's why I suspect after loading the blob for each row, the system might have run out of memory and threw that error.

Now my question is, can I make the blob property of that model lazily initialized? As far as I know we can make the association lazily initialized. I tried putting lazy="true" in the mapping document for that property, but that did not help.

Thanks in advance.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 12, 2007 4:40 pm 
Newbie

Joined: Mon Feb 26, 2007 11:35 am
Posts: 3
For lazy fetching of individual properties you need build time bytecode instrumentation.

More information can be found in the performance chapter at http://www.hibernate.org/hib_docs/reference/en/html/performance.html in section 19.1.7 for Using lazy property fetching

Hope this helps

- Tanay


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.