Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-6362

SEAM Entity creator uses Integer for @Version - results in NullPointerException on update

    Details

    • Affects:
      Release Notes
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Change Integer to int manually after code has been generated.

      Show
      Change Integer to int manually after code has been generated.
    • Release Notes Text:
      Hide
      In seam-gen, Entity fields that were annotated by @Version were set as an Integer data type. The Update operation was not compatible with the Integer data type, and terminated with a NullPointerException. The @Version data type has been changed from Integer to int. Entity Update operations now complete successfully.
      Show
      In seam-gen, Entity fields that were annotated by @Version were set as an Integer data type. The Update operation was not compatible with the Integer data type, and terminated with a NullPointerException. The @Version data type has been changed from Integer to int. Entity Update operations now complete successfully.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      ON_QA

      Description

      When creating entities from scratch, the seam-gen new entity will generate code with the the following:

      @Version
      private Integer version;

      This construct unfortunately results in new records being created with NULL in the version column. On subsequent updates this then results in NullPointerException.

      Changing Integer to int solves the problem.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  manaRH Marek Novotny
                  Reporter:
                  plarsen Peter Larsen
                  Writer:
                  Jared Morgan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  6 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: