OpenJPA
  1. OpenJPA
  2. OPENJPA-1842

CachedEntityStatistics depends on @GeneratedValue which is not supported in Oracle by default

    Details

    • Type: Test Test
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.0, 2.0.1
    • Fix Version/s: 2.0.2, 2.1.0
    • Component/s: None
    • Labels:
      None

      Description

      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.

        Activity

          People

          • Assignee:
            Albert Lee
            Reporter:
            Albert Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development