db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Nitz ...@ukr.net>
Subject Re: changes and additions to support oracle lobs
Date Thu, 19 Dec 2002 10:12:48 GMT
Thank you for the info, Michael!

Oleg

On Wednesday 18 December 2002 23:03, you wrote:
> 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


Mime
View raw message