-
Notifications
You must be signed in to change notification settings - Fork 3
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
Enforce uniqueness of Partij #267
Comments
A |
See also my comment on issue #233 |
Because #233 had veered into discussions of uniqueness which strictly belong here, I just wanted to add a proposal based on Hugo's comment in the 26/11 meeting that we can enforce the The simplest solution would be to keep the
These together would enforce that every This does not solve all problems. In particular, it you query the |
@mariusvandam proposal for an amended ticket description, feel free to copy it into the main description if we're all in agreement: Thema / ThemeKlantinteracties API Omschrijving / DescriptionIt is currently possible to create multiple identical Partij Identificator records for the same 'Partij' As a replacement story for #241 we should create a more intelligent enforcement of uniqueness for partij. Depending on the used identificatoren for a Partij, different logic should be applied to make sure a single Partij is only created once.
This will almost certainly require some kind of bulk creation/deletion of identificatoren, to avoid to avoid intermediate states which would violate these invariants (e.g. if there's already a Partij with 1 It would also require being able to filter the Toegevoegde waarde / Added valueThe value of an identificator should be that it actually functions as a unique identifier, both for developer experience (no difficult-to-resolve edge-cases to handle), but it would also improve the data quality (less chance of spurious duplicates). This would be complementary to #233 . Specifically it is important that there is no ambiguity when referring to vestigingen, where two vestigingen may have the same number but different parent Aanvullende opmerkingen / Additional contextNo response |
Thema / Theme
Klantinteracties API
Omschrijving / Description
It is currently possible to create multiple identical Partij Identificator records for the same 'Partij'
As a replacement story for #241 we should create a more intelligent enforcement of uniqueness for partij. Depending on the used identificatoren for a Partij, different logic should be applied to make sure a single Partij is only created once.
bsn
can only be occur once (natural persons)kvkNummer
without avestigingsnummer
can only occur once (representing the "niet natuurlijk persoon" in general, separate from any concrete vestiging)kvkNummer
ANDvestigingsnummer
can only occur once (vestigingen, disambiguated according to their associated parent entity)Partij
can never have a vestigingsnummer assigned without akvkNummer
being assigned at the same timeThis will almost certainly require some kind of bulk creation/deletion of identificatoren, to avoid to avoid intermediate states which would violate these invariants (e.g. if there's already a Partij with 1
kvkNummer
, you would have to provide bothkvkNummer
andvestigingsnummer
together for a secondPartij
you might want to create to represent a vestiging separately from the generic niet-natuurlijk persoon).It would also require being able to filter the
Partij
resource on an array of identificator values (to filter a list down to a specifickvk
/vestigingsnummer
pairing (ideally using the identificator register/objecttype/id values directly, to avoid having to first fetch the partij identificatoren and filter on the identificator UUIDs).Toegevoegde waarde / Added value
The value of an identificator should be that it actually functions as a unique identifier, both for developer experience (no difficult-to-resolve edge-cases to handle), but it would also improve the data quality (less chance of spurious duplicates). This would be complementary to #233 . Specifically it is important that there is no ambiguity when referring to vestigingen, where two vestigingen may have the same number but different parent
kvkNummer
entities.Aanvullende opmerkingen / Additional context
No response
The text was updated successfully, but these errors were encountered: