openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Milosz Tylenda (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-525) Inserts new entity with NULL value for Clob column actually inserts empty string
Date Sat, 15 Aug 2009 11:24:14 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12743677#action_12743677
] 

Milosz Tylenda commented on OPENJPA-525:
----------------------------------------

This issue is Oracle-specific.

To answer Amy's initial question (unfortunately that comment is visible only when you are
logged in):

> We're using empty_lob() instead of "null" when the Lob field has no value even it is
nullable. is there any historical reason to do so?

I think the reason is: if we set a LOB column to null we are not able to later update that
column with a string longer that 4000 chars. Most probably it was needed in Oracle 8 times
but looks like is not needed anymore (starting from Oracle 9 or 10). We should consider reworking
our Oracle LOB support - there are chances that some Oracle-specific code can now be avoided
and issues like this will disappear.

I will open a new issue for the idea of reworking Oracle LOB support.



> Inserts new entity with NULL value for Clob column actually inserts empty string
> --------------------------------------------------------------------------------
>
>                 Key: OPENJPA-525
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-525
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0, 1.0.2, 1.1.0, 2.0.0
>         Environment: OpenJPA 1.0.0, 1.0.2
> Oracle XE 10g (JDBC driver 10.2.0.3.0
> JRE 1.5.0_13
>            Reporter: Frank Le
>            Assignee: Milosz Tylenda
>             Fix For: 1.1.1, 2.0.0
>
>         Attachments: OPENJPA-525.2.patch, OPENJPA525.patch, OPENJPA525_1_1_x.patch
>
>
> Inserts new entity with NULL value for Clob column with "nullable = true" actually inserts
empty string as the value!
> Here's the persistence class:
> public class Exam... {
>     @Lob
>     private String text;
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message