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

DataOnDemand ITD references non-existing abstract class if the corresponding member is @NotNull

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0.RC2
    • Fix Version/s: 1.0.0.RC3
    • Component/s: TESTING
    • Labels:
      None

      Description

      the following roo script

       
      project --topLevelPackage tld.domain.project --java 6 --projectName icc_roo2
      
      persistence setup --database HYPERSONIC_IN_MEMORY --provider HIBERNATE
      
      
      entity --abstract --name ~.model.AbstractEntity
      
      entity --name ~.model.ConcreteEntity --testAutomatically
      field reference --fieldName reference --type ~.model.AbstractEntity --notNull yes
      

      produces the entity

      @Entity
      @RooJavaBean
      @RooToString
      @RooEntity
      public class ConcreteEntity {
      
          @NotNull
          @ManyToOne(targetEntity = AbstractEntity.class)
          @JoinColumn
          private AbstractEntity reference;
      }
      

      and the following DataOnDemand ITD

      privileged aspect ConcreteEntityDataOnDemand_Roo_DataOnDemand {
      [...]
          @Autowired    
          private AbstractEntityDataOnDemand ConcreteEntityDataOnDemand.abstractEntityDataOnDemand;    
      [...]
      

      Unfortunately AbstractEntityDataOnDemand does not exist.
      And it can not be created because --testAutomatically is not allowed for abstract classes.
      The reference to abstractEntityDataOnDemand is only included if the corresponding class member is marked as @NotNull.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                balex Ben Alex
                Reporter:
                tisch Tim Schmidt
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: