bug #7252
closedcreatedby_id often is null
0%
Description
Examples¶
cdm_production_phycobank
TaxonName
- is null: 1766
- not null: 533
Registration
- is null: 1188
- not null: 0
Updated by Andreas Kohlbecker about 6 years ago
- Status changed from New to Feedback
- Target version changed from Unassigned CDM tickets to Release 4.14
Hi Andreas,
what can be the cause for this odd issue.
Andreas
Updated by Andreas Müller about 6 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Andreas Müller to Andreas Kohlbecker
This is often the case for imports running from commandline. They can run without authentification. It is also the case as far as I can see as all TaxonName and Registration with createdby_id IS NULL have almost the same created date.
Is there any problem with createdby_id = NULL or can we close the ticket?
Updated by Andreas Kohlbecker about 6 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Kohlbecker to Andreas Müller
I consider this as problematic since it it a source for potential errors and misuse of the cdm entities.
We are very eager to provide a clear API to developers that helps avoiding errors. For example the Reference
model provides interfaces for each reference type!
On the other hand we now have the createdBy field. An entity that exists has obviously been created by someone, otherwise it could not exists at all. This field now can be just null
in some cases which are not clear to anyone but to the person who wrote and ran the import.
I think we either force createdBy
to never be null and set all null values to the user id '10' or we should clearly indicate in the documentation of the getter that the createdBy user can be null
.
Updated by Andreas Kohlbecker about 6 years ago
- Status changed from Feedback to Resolved
- % Done changed from 0 to 50
Applied in changeset cdmlib|d199517b4b86e38386578de341491f62819ea651.
Updated by Andreas Kohlbecker about 6 years ago
- Status changed from Resolved to Closed
- Assignee changed from Andreas Müller to Andreas Kohlbecker
- % Done changed from 50 to 0