Project

General

Profile

Actions

bug #7133

closed

Registration must not allow duplicate identifers

Added by Andreas Kohlbecker over 6 years ago. Updated about 6 years ago.

Status:
Rejected
Priority:
New
Category:
cdmlib
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
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

Actions #1

Updated by Andreas Müller over 6 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.

Actions #2

Updated by Andreas Kohlbecker about 6 years ago

  • Target version changed from Release 4.13 to Release 5.0
Actions #3

Updated by Andreas Kohlbecker about 6 years ago

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

Also available in: Atom PDF