-->
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.  [ 3 posts ] 
Author Message
 Post subject: CLOB & BLOB on p200
PostPosted: Thu Oct 21, 2004 4:28 pm 
Newbie

Joined: Fri Oct 08, 2004 12:43 pm
Posts: 8
Location: California
I was greatly disturbed when I read on page 200 that CLOB and BLOB properties only exist in the scope of a transaction!

Does this imply that properties that are serialized Java Objects (that is they have no UserType and are Serializable) and therefore could be mapped to either a BLOB or VARBINARY, can't be used outside of a transaction if they are mapped to either? Or is it only if they are mapped to VARBINARY they are useable in detached objects?

Does it also imply that large String can be used in detached objects if it is of type VARCHAR but not if it is of type CLOB?

And why can't they be used outside of the transaction scope? Is the vendor's JDBC doing something tricky with them like only retrieving portions of the CLOB or BLOB as it's traversed/read?

This is a very serious issue for me in that I have an XML application where I'm trying to 1) hold onto the original XML in a CLOB and 2) the digested DOM in a BLOB (by having a property that uses a Serializable DOM Wrapper class). Do I have to perform the serialization/deserialization myself when accessing the tuple? Or should I be using VARCHAR and VARBINARY respectively?

It is also possible that I could work with the containing object within the scope of a transaction but I don't want to needlessly restrict myself.

The database that will be used is DB2 but I need to know the general solution as well.

Jerome Dayton-


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 21, 2004 4:48 pm 
Hibernate Team
Hibernate Team

Joined: Tue Sep 09, 2003 2:10 pm
Posts: 3246
Location: Passau, Germany
Of course you can use a String or an Object mapped to a blob field when detatched. You just can not use a property of type java.sql.Blob


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 21, 2004 4:56 pm 
Newbie

Joined: Fri Oct 08, 2004 12:43 pm
Posts: 8
Location: California
Just to re-iterate:

So it is using java.sql.Clob or java.sql.Blob as the properties that is the issue, not the SQL mappings to CLOB or BLOB? Therefore I can freely properties of type serializabe and map them to a SQL BLOB Column? And I can use properties of type String and map them to a SQL CLOB Column?

Thanks for the clarification.

Jerome Dayton-


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