Linking subsets and datasets with accessions
Dataset currently uses a list of
AccessionIdentifier records to specify which accessions (by instcode, accenumb, genus or doi) are referenced in the dataset.
Subset, on the other hand, uses a list of
AccessionId so that even if the accession is deleted from Genesys (and is removed from
Accession and added to
AccessionHistoric) the subset still maintains the reference to the original record. This was a good idea originally, but it fails in the case where an accession is reuploaded to Genesys -- Subset will not link to the correct record anymore.
Properly referencing accessions
- Rename and move
private AccessionId accessionto
private Accession accession
- We can now use
@JsonUnwrapped. This will embed all key data from
Accession into this object (hope that works).
- When an accession is deleted from
accession) the code should update all
- When an accession is saved to
accession) the code should update
AccessionRef#accessionwhere a match is found.
private List<AccessionId> accessions with
private List<AccessionRef> accessions.
This allows us to have Subsets that "reference" an accession that does not have passport data in Genesys, but it will in the future. It also allows users to delete an accession (rarely) and re-upload it to the system.
inverseJoinColumns = @JoinColumn(name = "acce_id")to
- Migrate all existing data