Skip to content

2.5.0 snapshot#2794

Merged
01es merged 28 commits into
developfrom
2.5.0-SNAPSHOT
Jul 12, 2026
Merged

2.5.0 snapshot#2794
01es merged 28 commits into
developfrom
2.5.0-SNAPSHOT

Conversation

@01es

@01es 01es commented Jul 12, 2026

Copy link
Copy Markdown
Member

All PRs for the 2.5.0 release have been reviewed and merged into the 2.5.0-SNAPSHOT branch.

homedirectory and others added 28 commits July 1, 2026 11:48
Issue #2775 - `@RequireTimezone`: Ignore tests based on timezone
…tectable.

Cascade deletion of audit records introduced a statement-parameter limit on batch deletion of audited entities.
'EntityBatchDeleteByIdsOperation' inlines ID values as SQL literals, but EQL binds a statement parameter per value, as 'Value2.needsParameter' parameterises 'Long'.
For activatable entities this was a pre-existing defect, in the query that streams them for individual deletion.
Cascade deletion of audit records extended it to audited, non-activatable entities, which had been exempt because 'EntityBatchDeleteByIdsOperation' inlines ID values as SQL literals.
ID values are now batched at 990 per statement, as 'EntityContainerEnhancer' already does.

The audit guard is hoisted into 'isAuditCascadeRequired'.
Previously the EQL model over the whole collection of IDs was constructed even for entity types that are not audited, only to be discarded.

'AuditedEntityDeletionTest' could not detect orphaned audit-prop records.
It located them through 'auditEntity.auditedEntity', a path that starts with a required key-member, which EQL renders as an inner join.
Audit-prop records whose audit-entity record had already been deleted were dropped by that join rather than revealed by it, so every test passed even with the deletion of audit-prop records disabled.
Audit-prop records are now also matched on their own 'auditEntity' property, without a join, which makes orphans visible.
This was verified by disabling the deletion of audit-prop records, whereupon all 10 tests fail.

Property path 'auditEntity.auditedEntity' is captured by new constant 'AbstractAuditProp.PATH_TO_AUDITED_ENTITY'.
It documents the inner-join trap in one place, and explains why audit-prop records must be deleted before audit-entity records.

'DeleteOperations' now documents the cascade, which is a material change to the contract of its public delete operations.

Updated the relevant program instructions:
 A section on deletion was added to the auditing reference, covering the ordering requirement and, in particular, what is not cascaded.
'auditUser' and historical values of entity-typed audited properties retain their foreign keys, so an entity referenced by the audit trail of another audited entity remains undeletable, as intended.
Corrected the claim that audit records survive deletion of the audited entity, and the claim that DAO test configurations disable auditing, which 'PlatformDomainDrivenTestCaseConfiguration' has not done for some time.

Restored '@SuppressWarnings(unchecked)', lost when 'deleteActivatable' was extracted, and removed the need for the second one by accepting 'SingleResultQueryModel<?>', which the EQL API takes as a wildcard.
'DeleteOperations' now compiles without warnings.
Reverted 'FactoryImpl' to a final class with a package-private constructor, as Guice neither subclasses nor intercepts it.
Hoisted 'navigate' and 'create' out of the cascade loops, applied try-with-resources to the entity stream.
Issue #2771 - Deletion of audited but not referenced entity records
#2787 Add withMinAutoRefreshInterval to throttle SSE-driven centre au…
@01es 01es merged commit 5bc6a61 into develop Jul 12, 2026
2 checks passed
@01es 01es deleted the 2.5.0-SNAPSHOT branch July 12, 2026 09:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants