Project

General

Profile

bug #7133

Registration must not allow duplicate identifers

Added by Andreas Kohlbecker over 2 years ago. Updated over 2 years ago.

Status:
Rejected
Priority:
New
Category:
cdmlib
Target version:
-
Start date:
12/08/2017
Due date:
% Done:

0%

Severity:
critical
Found in Version:
Tags:

Description

It is possible to create registrations with the same identifier twice, this must be prevented on the model level.

Set the identifier field to unique

History

#1 Updated by Andreas Müller over 2 years ago

  • Status changed from New to Resolved
  • Assignee changed from Andreas Müller to Andreas Kohlbecker

No the identifier field can not be unique as the same identifier string may exist for different identifier types. But event with a combined key (type, string) it is still not possible. Sometimes you may want to store "null" or "" as a key to explicitly say that no identifier of this type exists. And this key will not be unique then. Also we may use the same key for multiple records (e.g. taxon names) if they have the same identifier in some external database (e.g. because the external DB does not distinguish authors or different spellings).

Only soft validation e.g. via the validation framework might be possible (e.g. level3 validation). But in general the application should try to implement validation prior to data persistence to avoid such data).
However, if you absolutely need to prevent duplicate keys in a certain database on database level you may add the unique key on database level, which may result in exceptions coming from the very bottom but this may still be better then having dirty data.

Please set to "rejected" if you agree.

#2 Updated by Andreas Kohlbecker over 2 years ago

  • Target version changed from Release 4.13 to Release 5.0

#3 Updated by Andreas Kohlbecker over 2 years ago

  • Status changed from Resolved to Rejected
  • Target version deleted (Release 5.0)

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)