Core Persistence Commons

Configuration that is common to all database persistence implementations.

Property Default Description

causeway.persistence.commons.
entity-change-tracker.
suppress-auto-flush

true

Normally any query submitted to RepositoryService#allMatches(Query) will trigger a flush first, unless auto-flush has been disabled.

However, this auto-flush behaviour can be troublesome if the query occurs as a side-effect of the evaluation of a derived property, whose value in turn is enlisted by an implementation of a subscriber (in particular EntityPropertyChangeSubscriber) which captures the value of all properties (both persisted and derived). However, this behaviour can (at least under JDO), result in a ConcurrentModificationException.

By default, EntityChangeTracker will therefore temporarily suppress any auto-flushing while this is ongoing. The purpose of this configuration property is to never suppress, ie always autoflush.

causeway.persistence.commons.
repository-service.
disable-auto-flush

Normally any queries are automatically preceded by flushing pending executions.

This key allows this behaviour to be disabled.

this key is redundant for JPA/EclipseLink, which supports its own auto-flush using eclipselink.persistence-context.flush-mode