Implement equals and hashCode for domain models#391
Implement equals and hashCode for domain models#391Brad-Edwards wants to merge 4 commits intodevfrom
Conversation
Implement business-key based equals/hashCode on Requirement, RequirementRelation, and TraceabilityLink to fix unreliable Set deduplication and membership checks across JPA session boundaries. - Requirement: equality by uid (globally unique per DB constraint) - RequirementRelation: equality by (source.id, target.id, relationType) - TraceabilityLink: equality by (requirement.id, artifactType, artifactIdentifier, linkType) Composite keys mirror the existing DB unique constraints. Tests added to each unit test class covering same-key equality, different-key inequality, hash code consistency, and Set deduplication. https://claude.ai/code/session_014UW7zGZPL22dEg9LRjjyHi
|
@copilot Merge dev then assess whether this work is still useful. If so, handle any merge conflicts or changes required, and add a succinct update to the Changelog, bump appropriate version level (no unreleased). Date is 2025-03-29 |
…ech-debt-dHxO5 Co-authored-by: Brad-Edwards <56809295+Brad-Edwards@users.noreply.github.com>
Agent-Logs-Url: https://github.com/KeplerOps/Ground-Control/sessions/45c73c68-05a2-4a4b-b12e-0a7f96e87cb7 Co-authored-by: Brad-Edwards <56809295+Brad-Edwards@users.noreply.github.com>
Agent-Logs-Url: https://github.com/KeplerOps/Ground-Control/sessions/45c73c68-05a2-4a4b-b12e-0a7f96e87cb7 Co-authored-by: Brad-Edwards <56809295+Brad-Edwards@users.noreply.github.com>
Merged Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Summary
Implements
equals()andhashCode()methods forRequirement,RequirementRelation, andTraceabilityLinkdomain models to enable proper equality comparison and collection deduplication based on the current natural keys after mergingdev.Related Issues
Changes
uidRequirementTestandTraceabilityLinkTestto cover same-project/case-insensitive equality, cross-project inequality, transient object behavior, hashCode consistency, null/type safety, and set deduplicationCHANGELOG.mdentry dated2025-03-29Test Plan
RequirementTest.Equality,RequirementTest.RelationEquality,TraceabilityLinkTest.Equality)make checkpassesChecklist
java.util.Objects/java.util.Locale)@Auditedannotationshttps://claude.ai/code/session_014UW7zGZPL22dEg9LRjjyHi
⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.