You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "Daniel Keir Haywood (Jira)" <ji...@apache.org> on 2021/07/24 14:23:00 UTC

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

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

Daniel Keir Haywood updated ISIS-2821:
--------------------------------------
    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

 

  was:
 

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.

 


> Arch tests to verify uniqueness constraints (and other ideas)
> -------------------------------------------------------------
>
>                 Key: ISIS-2821
>                 URL: https://issues.apache.org/jira/browse/ISIS-2821
>             Project: Isis
>          Issue Type: New Feature
>          Components: Isis Testing
>    Affects Versions: 2.0.0-M5
>            Reporter: Daniel Keir Haywood
>            Priority: Minor
>             Fix For: 2.0.0
>
>
>  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.3.4#803005)