Uploaded image for project: 'Spring Roo'
  1. Spring Roo
  2. ROO-3432

entity jpa --versionField "" is ignored

    Details

      Description

      Setting an entities version field name to the empty string is ignored.

      roo> project --topLevelPackage roo.jira --projectName roo-3432
      roo> jpa setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT
      roo> entity jpa --class roo.jira.Entity --versionField ""
      

      The above commands will still produce an entity with a version field.

      roo.jira.Entity.java
      ...
      @RooJavaBean
      @RooToString
      @RooJpaActiveRecord
      public class Entity {
      }
      
      roo.jira.Entity_Roo_Jpa_Entity.aj
      ...
      privileged aspect Entity_Roo_Jpa_Entity {
      
          declare @type: Entity: @javax.persistence.Entity;
      
          @Id
          @GeneratedValue(strategy = GenerationType.AUTO)
          @Column(name = "id")
          private Long Entity.id;
      
          @Version
          @Column(name = "version")
          private Integer Entity.version;
      ...
      

        Attachments

          Activity

            People

            • Assignee:
              stewarta Alan Stewart
              Reporter:
              karlbennett Karl Bennett
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: