You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@causeway.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2023/03/18 12:30:00 UTC

[jira] [Updated] (CAUSEWAY-2821) [Wish] Arch tests to verify uniqueness constraints (and other ideas)

     [ https://issues.apache.org/jira/browse/CAUSEWAY-2821?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Keir Haywood updated CAUSEWAY-2821:
------------------------------------------
    Component/s: Testing archtestsupport
                     (was: Testing)

> [Wish] Arch tests to verify uniqueness constraints (and other ideas)
> --------------------------------------------------------------------
>
>                 Key: CAUSEWAY-2821
>                 URL: https://issues.apache.org/jira/browse/CAUSEWAY-2821
>             Project: Causeway
>          Issue Type: Wish
>          Components: Testing archtestsupport
>    Affects Versions: 2.0.0-M5
>            Reporter: Daniel Keir Haywood
>            Priority: Minor
>
>  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
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)