Migrating from 2.0.0-RC4 to 2.0.0
Programming Model (CAUSEWAY-3697)
Annotation attribute
@DomainService(nature=..)
was marked for removal and no longer has any scope filtering effect.
This filtering is or will be replaced by some other mechanism eg. configuration option.
Programming Model (CAUSEWAY-3692)
Annotation attribute
@Parameter(dependentDefaultsPolicy=..)
was renamed to
@Parameter(precedingParamsPolicy=..)
, also enum
DependentDefaultsPolicy
was renamed to PrecedingParamsPolicy
and enum value
UPDATE_DEPENDENT
was renamed to RESET
.
CausewayConfiguration also changed:
#old
causeway.applib.annotation.parameter.dependentDefaultsPolicy=..
#new
causeway.applib.annotation.parameter.precedingParametersPolicy=..
AuditTrailEntryRepository and others have simplified the API (CAUSEWAY-3390)
In this release the AuditTrailEntryRepository
and similar is no longer parameterized by the entity type, and is also an interface.
So, instead of:
@Inject AuditTrailEntryRepository<? extends AuditTrailEntry> auditTrailEntryRepository;
it should now be just:
@Inject AuditTrailEntryRepository auditTrailEntryRepository;
This applies to:
For more details, see CAUSEWAY-3390.
Auto-flush management (CAUSEWAY-3675)
By default any queries executed by RepositoryService are preceded by a flush first. The rationale behind this is to make sure that everything that might have changed is in the database.
However, with JDO at least, this behaviour can cause a ConcurrentModificationException
when coupled with the EntityChangeTrackerDefault internal service, used by auditing.
This grabs the value of properties, including derived properties that are evaluated using a query.
So now, EntityChangeTrackerDefault suppresses the autoflush.
Changes:
-
To revert to the original behaviour, use the new
causeway.commons.persistence.entity-change-tracker.suppress-auto-flush
property. -
The
causeway.core.runtime-services.repository=service.disable-auto-flush
configuration property has been renamed tocauseway.commons.persistence.repository-service.disable-auto-flush
.
For more details, see CAUSEWAY-3675.
Mavendeps webapp module and the GraphQL viewer (CAUSEWAY-3676)
The GraphQL viewer is a brand new viewer, automatically exposing your domain object model as a GraphQL API. The documentation can be found here.
As part of this work, the org.apache.causeway.mavendeps:causeway-mavendeps-webapp
convenience module has been updated.
It now references all 3 viewers (Wicket, Restful and GraphQL) as a one-stop shop for bringing in viewers.
<dependency>
<groupId>org.apache.causeway.mavendeps</groupId>
<artifactId>causeway-mavendeps-webapp</artifactId>
</dependency>
It is still necessary to add in the persistence and security modules.
For more details, see CAUSEWAY-3676.