hyrax icon indicating copy to clipboard operation
hyrax copied to clipboard

App generated through template includes collection model that is an AF::Base model

Open elrayle opened this issue 4 years ago • 1 comments

Descriptive summary

The generated app/model/collection.rb extends ActiveFedora::Base. To move to Valkyrie, the generated collection model needs to be_a Hyrax::Resource.

It is unclear if the generated collection is needed. Is there a reason not to just use Hyrax::PcdmCollection?

Rationale

All models should be_a Hyrax::Resource to work with Valkyrie persistence.

Expected behavior

Generating a new Hyrax app using template.rb creates Collection < Hyrax::PcdmCollection in the new app's app/models/collection.rb.

QUESTION:

It is unclear if the generated collection is needed. Is there a reason not to just use Hyrax::PcdmCollection?

Actual behavior

Generating a new Hyrax app using template.rb creates Collection < ActiveFedora::Base in the new app's app/models/collection.rb.

Steps to reproduce the behavior

  1. Generate a new Hyrax app using...
rails _5.2.6_ new my_hyrax -m https://raw.githubusercontent.com/samvera/hyrax/v3.1.0/template.rb

NOTE: May need to adjust the tag from v3.1.0 to the latest version tag for Hyrax.

Related Work

Issue #5098 App generated through template includes file_set model that is an AF::Base model Issue #5100 App generated by template includes .fcrepo_wrapper for connecting to Fedora

elrayle avatar Sep 10 '21 21:09 elrayle

i suspect we're not quite ready for this? a variety of tickets are open related to collection handling for valkyrie.

i'd suggest we hold this one until after manual testing on nurax-pg has carried forward.

no-reply avatar Jan 28 '22 22:01 no-reply