Alternative option for Affiliation#260
Conversation
- shorten Affiliation.name to 255 characters - add more verbose comments on the purpose of Affiliation.fullReference versus Affiliation.name
|
To illustrate this with a real world example: with the implementation proposed here, the affiliations for the first author could be set as: [{'fullReference': 'Optics for Solar Energy, Helmholtz-Zentrum Berlin für Materialien und Energie, Albert-Einstein-Straße 16, 12489 Berlin',
'name': '01: HZB',
'pid': 'ROR:02aj13c28'},
{'fullReference': 'Computational Nano Optics, Zuse Institute Berlin, Takustraße 7, 14195 Berlin',
'name': '02: ZIB',
'pid': 'ROR:02eva5865'}]The prefix |
|
I'm not entirely comfortable with the dual use of the name field regarding it also being used for ordering. Would it be better to put this in a separate "orderKey" field like has been done in DataPublicationUser? |
How the new entity classes are actually being used in practice and whether they use the As the result of adding We could also rename Footnotes
|
|
OK, I'm happy to go with your implementation as is (no need to rename |
This provides a slightly modified option for the implementation of the
Affiliationtable with respect to #256.Background is that in an earlier implementation, the
nameattribute was set to aSTRING[1023]. This caused problems, becausenameis part of the uniqueness constraint and thus needs to be included in an index in the database. ButSTRING[1023]is too large to be added to an index. In #256 this is solved by shorteningnametoSTRING[511].The present PR suggest a different solution by splitting
namein two attributes. In fact, in the version provided by #256,nameserves a double purpose: it is used to disambiguate the affiliation entry in the case that one user has more than one affiliation in a publication and it sets the text to be displayed on the landing page and to be included in the publication metadata. This PR proposes two attributes:nameis purely internal for the purpose of disambiguation andfullReferencewill set the text to be set in the visible metadata.As a result,
Affiliationwill look like:AffiliationThe home institute or other affiliation of a user in the context of a data publication
Uniqueness constraint:
user,nameRelationships:
Other fields:
This has the following advantages:
nameeven more toSTRING[255]. This may improve performance in the database index.namecan at the same time be used to provide a well defined order to display the affiliations on the landing page.The only disadvantage I can see is that it adds another attribute.
We briefly discussed this in the November collaboration meeting, but decided we would need more time for discussion. I submit this as a separate PR in order to open a space for this discussion.