Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-1842

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

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0, 2.0.1
    • 2.0.2, 2.1.0
    • None
    • 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.

      Attachments

        Activity

          People

            allee8285 Albert Lee
            allee8285 Albert Lee
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: