Skip to content

Commit b9fa627

Browse files
committed
add warning on primary key duplication;
1 parent 24af275 commit b9fa627

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/data-modeling.md

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ 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 "Primary Key Duplication Can Happen"
60+
By default, Hollow does not enforce the uniqueness of primary keys. User can add multiple records with the same primary key into the data set. To enforce primary key uniqueness, please use the predefined [DuplicateDataDetectionValidator](validation.md#pre-defined-validators) on the producer side.
61+
This enforcement is turned off by default as it comes at a cost of performance (CPU/memory).
62+
5963
!!! warning "Null values are not supported"
6064
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.
6165

0 commit comments

Comments
 (0)