Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.
Valkyrie doesn't uniformly support custom id values, with some adapters providing their own ids from the data store side (e.g. the postgres adapter uses uuid-ossp to generate UUIDs for object ids). in theory, we can use alternate_ids to store custom minted NOIDs, but this presents a complex reference and lookup scenario, where internal references between objects use id, but user input and stable URIs should use the custom minted NOID.
at time of writing, support is as follows:
Wings supports NOIDs. it uniformly stores object ids in BOTH id and alternate_ids, and treats the two as interchangeable (i.e. id and alternate_ids.first are always the same for Wings objects, and lookup for the two should be equivalent).
other adapters do not support NOID minting. using config.enable_noids = true with any Valkyrie adapter other than Wings will lead to unexpected behavior (NOIDs may never mint, lookup of objects in controllers will likely break).
Rationale
so the status quo is more or less: Hyrax with Valkyrie doesn't support custom NOIDSs. this ticket is to discuss the questions:
Do we want to retain custom minted NOIDs as a Hyrax layer feature, post-Wings?_;
Do we want to support REST API object lookup using alternate_ids (whether those are Hyrax-minted NOIDs or not);
e.g. should Hyrax support URI-based lookup of custom minted DOIs, ARKs, or other stable identifiers stored in alternate_ids?
Should identifier minting and lookup be strictly an adapter layer consideration?
Steps to reproduce the behavior
Create a new Hyrax app;
Configure it to use the valkyire postgres adapter
Ensure enable_noids is true
Create a work
Try to edit that work, or generally use the UI; observe various unhandled exceptions, probably coming from ValkyrieCanCanAdapter
Descriptive summary
Valkyrie doesn't uniformly support custom
id
values, with some adapters providing their own ids from the data store side (e.g. the postgres adapter usesuuid-ossp
to generate UUIDs for object ids). in theory, we can usealternate_ids
to store custom minted NOIDs, but this presents a complex reference and lookup scenario, where internal references between objects useid
, but user input and stable URIs should use the custom minted NOID.at time of writing, support is as follows:
Wings
supports NOIDs. it uniformly stores object ids in BOTHid
andalternate_ids
, and treats the two as interchangeable (i.e.id
andalternate_ids.first
are always the same forWings
objects, and lookup for the two should be equivalent).config.enable_noids = true
with any Valkyrie adapter other than Wings will lead to unexpected behavior (NOIDs may never mint, lookup of objects in controllers will likely break).Rationale
so the status quo is more or less: Hyrax with Valkyrie doesn't support custom NOIDSs. this ticket is to discuss the questions:
alternate_ids
(whether those are Hyrax-minted NOIDs or not);alternate_ids
?Steps to reproduce the behavior
enable_noids
istrue
ValkyrieCanCanAdapter