Registration must not allow duplicate identifers
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
#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.