db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Mogley" <michael.mog...@verizon.net>
Subject Re: changes and additions to support oracle lobs
Date Wed, 18 Dec 2002 23:03:33 GMT
Yes.  Let's say  the object maps to:

MyTable (ID, Name, MyBlob, MyClob)

On update, I issue the following SQL:

1. UPDATE MyTable SET Name = ?, MyBlob = EMPTY_BLOB(), MyClob = EMPTY_CLOB()
WHERE ID = ?
2. SELECT MyBlob, MyClob FROM MyTable WHERE ID=? FOR UPDATE

The only disadvantage of this is that the lobs will be rewritten from start
to finish regardless of how little the data changes.  However, this does
satisfy the general use case - at least in a web-app context.

Michael

----- Original Message -----
From: "Oleg Nitz" <on@ukr.net>
To: <ojb-dev@jakarta.apache.org>
Sent: Wednesday, December 18, 2002 4:27 PM
Subject: Re: changes and additions to support oracle lobs


On Wednesday 18 December 2002 22:07, you wrote:
> The code I've submitted deals with this situation correctly by always
> resetting the lob to an empty state (even for update).
How do you do this? Are you setting its value to "empty_blob()" via a
separate
SQL query like "UPDATE table SET blob = empty_blob()" ?

Thanks,
 Oleg

--
To unsubscribe, e-mail:   <mailto:ojb-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ojb-dev-help@jakarta.apache.org>


Mime
View raw message