openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Albert Lee (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-1842) CachedEntityStatistics depends on @GeneratedValue which is not supported in Oracle by default
Date Tue, 19 Oct 2010 14:43:26 GMT

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

Albert Lee commented on OPENJPA-1842:
-------------------------------------

Changing from IDENTITY to AUTO also causes some test failures running against MSSQL:

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Cannot insert explicit value
for identity column in table 'CachedEntityStatistics' when IDENTITY_INSERT is set to OFF.
{prepstmnt 20188152 INSERT INTO CachedEntityStatistics (id, firstName, lastName, version)
VALUES (?, ?, ?, ?) [params=?, ?, ?, ?]} [code=544, state=S0001]

and Sybase:

Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: Explicit value specified for
identity field in table 'CachedEntityStatistics' when 'SET IDENTITY_INSERT' is OFF.
{prepstmnt 724577072 INSERT INTO CachedEntityStatistics (id, firstName, lastName, version)
VALUES (?, ?, ?, ?) [params=?, ?, ?, ?]} [code=584, state=ZZZZZ]

BTW, we are not proposing changing all IDENTITY to something else. If so that leave us a hole
in testing this functionality.

Need to take a close look at what can be done here.


> CachedEntityStatistics depends on @GeneratedValue which is not supported in Oracle by
default
> ---------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-1842
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1842
>             Project: OpenJPA
>          Issue Type: Test
>    Affects Versions: 2.0.0, 2.0.1
>            Reporter: Albert Lee
>            Assignee: Albert Lee
>            Priority: Minor
>             Fix For: 2.0.2, 2.1.0
>
>
> CachedEntityStatistics depends on @GeneratedValue which is not supported in Oracle by
default unless special trigger and OracleDictionary setting is implemented.
> Otherwise, the following similar exception will be observed.
> Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-01400: cannot insert
NULL into ("JPAUSER"."CACHEDENTITYSTATISTICS"."ID")
>  {prepstmnt 406657085 INSERT INTO CachedEntityStatistics (firstName, lastName, version)
VALUES (?, ?, ?) [params=?, ?, ?]} [code=1400, state=23000]
> SInce TestStatistics, the test case uses CachedEntityStatistics, is not testing GeneratedValue
per se, will remove the annotation and implement a simple id assignment in CachedEntityStatistics
 class.

-- 
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