2.5.0 snapshot#2794
Merged
Merged
Conversation
…h the codebase’s TimeZone spelling.
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.
…ies undeletable.
Issue #2771 - Deletion of audited but not referenced entity records
#2787 Add withMinAutoRefreshInterval to throttle SSE-driven centre au…
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
All PRs for the 2.5.0 release have been reviewed and merged into the 2.5.0-SNAPSHOT branch.