Skip to content

Commit 25cee6f

Browse files
add warning on primary key duplication; (#715)
* add warning on primary key duplication; * change wording;
1 parent 24af275 commit 25cee6f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/data-modeling.md

+7
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ When defined in the schema, primary keys are a part of your data model and drive
5656

5757
Primary keys defined in the schema follow the same convention as primary keys defined for indexes. They consist of one or more [field paths](indexing-querying.md#field-paths), which will auto-expand if they terminate in a `REFERENCE` field.
5858

59+
!!! warning "Duplidate record validation"
60+
Hollow producer does not dedupe records based on primary key definition, by default. For e.g. if two records with
61+
the same value for primary key field(s) but different values for other field(s) are added to the write state in a
62+
runCycle, both records will be accepted. A consumer querying using primary key will see inconsistent behavior.
63+
Either one of those records can be returned. To address this, Hollow offers the [DuplicateDataDetectionValidator](validation.md#pre-defined-validators), which enforces primary key constraints. This validator
64+
is not enabled by default and must be opted into.
65+
5966
!!! warning "Null values are not supported"
6067
Primary key field(s) cannot have null values. This is not supported as it was not needed. Please be mindful when adding values to primary key fields. This will result in exception similar to below.
6168

0 commit comments

Comments
 (0)