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.  [ 1 post ] 
Author Message
 Post subject: uninitialize a collection
PostPosted: Tue Aug 26, 2008 7:26 am 
Beginner
Beginner

Joined: Tue Nov 06, 2007 5:13 am
Posts: 28
what I need:
Code:
Cat getCatServiceFct() {
  Hibernate.initialize(cat.getKitten());
  work(cat.getKitten());
  Hibernate.uninitialize(cat.getKitten());
  return cat;
}


I actually found an old issue for this:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-289

unfortuantely it does not have any forum discussion assigned and it's been closed by gavin without detailed information.

however I think that is exactly what I need - let me explain my use case:

In my webapplicatin I have a service method, that reads a list of imageMetaInfo entities and each of them has an association with an imageData object (which holds the images binary data)

after reading the data, the service method will copy the binary data to another object (some resource servlet with a cache).

from this time on, I do NOT need the binary data any longer - so that's the point where I'd like to call
Code:
imageMetaInfo.uninitialize(imageData).


the service method then returns the imageMetaInfos to the client.
the binary data is of course completely useless for the client and we do not want the data to be transferred.
so I think uninitialize() would make sense in this case?

or does anyone know a viable workaround, like imageMetaInfo.setImageData(new HibernateProxy())?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.