Skip to content

Prevent duplicate inserts for canonical/reference rows #978

@dgee2

Description

@dgee2

Summary

Implement lookup-before-insert behavior for canonical/reference entities that should be reused instead of duplicated.

Scope

  • Identify reference-row creation paths
  • Add lookup-and-reuse behavior before insert
  • Align normalization/comparison with database uniqueness semantics

Deliverables

  • Repository/service support for reuse instead of duplicate creation
  • Tests covering existing-row reuse behavior

Acceptance criteria

  • Existing canonical rows are reused when equivalent input is provided
  • Covered paths no longer attempt duplicate inserts
  • Behavior remains client-transparent where appropriate

Testing

  • Unit tests for lookup-before-insert behavior
  • Integration tests proving existing canonical rows are reused

Dependencies

  • Depends on the duplicate-handling policy sub-issue

Parent: #887

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions