Repository navigation
1.2
Minor release with new entity base classes, value based keyset paging, nullness annotations and auditing fixes. Not a drop-in replacement for 1.1.x: see "Breaking changes".
Breaking changes
Page: the public constructors are now private. UsePage.of(...)orPage.with()...build(). #42Page#getLast()is removed. UsePage#getLastOrderingValues(). #42Bool.value(Boolean)is nowBool.value(boolean)andBool.isTruthy(Object)now returnsboolean. Source compatible, but code compiled against a previous version must be recompiled. #41
New features
LockedEntityandLockedBaseEntity: only a@Versioncolumn, withoutcreatedandlastModified. #51Page.with().range(offset, limit, lastOrderingValues, reversed): keyset paging with only the ordering values of the last seen record, e.g. its ID. APageno longer holds an entity. #42- The public API is annotated with
jakarta.annotation.Nullablewherenullis accepted or returned. #40
Auditing changes
- Snapshots of audited values are kept per entity instance and released along with it. Before, every loaded entity stayed in memory. #53
- Two persistence contexts updating the same entity are both audited. #53
- A second change of the same entity after a flush is audited against the previous flush. #53
- Loading an audited entity outside a
BaseEntityService, e.g. via a plainEntityManager, no longer throws aNullPointerException. #53 @Auditfields of superclasses are now audited. #53@Auditfields must be of a basic type, not an entity or collection. #53- On OpenJPA,
BaseEntityService#update()of a detached entity is now audited. A plainEntityManager#merge()outsideBaseEntityServiceis still not audited there. #53
Bug fixes
- Association mappings are resolved per
EntityManagerFactoryand per field path. A filter on a path reached via a second path or back through the root entity, e.g.phones.owner.groups, no longer throwsUnsupportedOperationException. With multiple persistence units, the first one no longer wins for all. #47 - On OpenJPA, field paths through a
@ManyToOneor@OneToOneare now resolved. #47 - An entity whose
@Tablehas nonamefalls back to the class name. #52 - Ordering on a field without a getter falls back to field access. #49
- A built
Pageis no longer modified when itsBuilderis reused. #42