-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#316 globaly unique but language specific index #358
Conversation
Currently we support `uniqueGlobally` attributes, which behave as a unique index over that attribute among all entities, regardless of the locale of the attribute, if the attribute is also `localized`. In some projects we want to use this index for URL attributes, but we only store relative URLs in the database. If the locale is bound (can be derived) to the missing part of the url - the domain/hostname - the URL will be the same for multiple locale variants and thus the globally unique constraint will be broken in this situation. We need to optionally support two `uniqueGlobally' behaviors: - **IN_ALL_LOCALES**: current behavior - **LOCALE_SPECIFIC**: new behavior where the database will only check for attribute uniqueness among attributes in the same locale. The second behavior disables the functionality of the implicit locale, which can no longer be derived from the unique attribute in the filter constraint for attributes with LOCALE_SPECIFIC uniqueness - since multiple locales can match the same content of the attribute value.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## dev #358 +/- ##
==========================================
+ Coverage 74.85% 74.91% +0.06%
==========================================
Files 1962 1957 -5
Lines 72366 72119 -247
Branches 7872 7835 -37
==========================================
- Hits 54167 54029 -138
+ Misses 14334 14255 -79
+ Partials 3865 3835 -30 ☔ View full report in Codecov by Sentry. |
…ic data without specifying locale
…y-within-locale attributes
# Conflicts: # evita_api/src/main/java/io/evitadb/api/requestResponse/schema/dto/CatalogSchema.java # evita_api/src/main/java/io/evitadb/api/requestResponse/schema/mutation/attribute/CreateGlobalAttributeSchemaMutation.java
No description provided.