Uploaded image for project: 'Causeway'
  1. Causeway
  2. CAUSEWAY-2821

[Wish] Arch tests to verify uniqueness constraints (and other ideas)

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 2.0.0-M5
    • None
    • None

    Description

       For JDO, the members of a @Unique or Index should match the name of a field.

      For JPA, the column names of a uniqueness constaint or index should match the explicit name of a @Column or else the inferred name from the member.

       every DomainObject must be annotated editing=DISABLED

      every DomainObject must be annotated either with bounded or with an autoCompleteRepository, and the autoCompleteMethod must exist in that repository.

      every DomainObject that is annotated with an autoCompleteRepository, the autoCompleteMethod (explicit or implicit name) must exist in that repository, and the class must be a @Repository.

      every JDO/JPA entity that is a subtype of an entity must NOT have an id declared.

      every abstract JDO/JPA entity should have only protected constructors (do not need to be no-arg)

      every domain services must use constructor injection only, no @Inject'd fields.  (Use Provider<X> to break cycles).

      every domain service must be annotated with @RequiredArgsConstructor (as preferred way of avoiding boilerplate)

      every JDO/JPA entity with a field reference to another entity should specify the column name, eg:

          @javax.jdo.annotations.Column(allowsNull = "false", name = "countryId")
          private Country country;

      every jdo/jpa entity should implement comparable of itself

       

      Attachments

        Activity

          People

            Unassigned Unassigned
            danhaywood Daniel Keir Haywood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: