We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b62e75c commit 8bb3775Copy full SHA for 8bb3775
store/postgres/src/relational.rs
@@ -559,9 +559,15 @@ impl Layout {
559
entity_id: entity_data.id(),
560
causality_region: CausalityRegion::from_entity(&entity_data),
561
};
562
- let overwrite = entities.insert(key, entity_data).is_some();
563
- if overwrite {
564
- return Err(constraint_violation!("duplicate entity in result set"));
+ if entities.contains_key(&key) {
+ return Err(constraint_violation!(
+ "duplicate entity {}[{}] in result set, block = {}",
565
+ key.entity_type,
566
+ key.entity_id,
567
+ block
568
+ ));
569
+ } else {
570
+ entities.insert(key, entity_data);
571
}
572
573
Ok(entities)
0 commit comments