Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update NestedCollectionPersistenceService to use CollectionMemberService #5076

Merged
merged 5 commits into from
Aug 17, 2021

Commits on Aug 17, 2021

  1. update NestedCollectionPersistenceService to use CollectionMemberService

    Since CollectionMemberService publishes `'object.metadata.updated'` and message published wants to attribute the action to a user, the persistence service methods added a `user:` parameter which defaults to nil for backwards compatibility.  Callers of these methods within Hyrax code were updated to pass a user or updated to call CollectionmemberService directly to avoid having to create an instance of the parent collection.
    elrayle committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    8e296e9 View commit details
    Browse the repository at this point in the history
  2. collection needs to be persisted to have an id

    Setting the relationship of nested collections through Valkyrie resources in the CollectionMemberService requires that the parent collection have an id assigned to be able to store the id in the child.  The previous approach through AF took care of establishing the relationship.
    elrayle committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    41794ac View commit details
    Browse the repository at this point in the history
  3. Update spec/services/hyrax/collections/nested_collection_persistence_…

    …service_spec.rb
    
    
    To support lazy loading with enumerables, it is better to check for empty.
    
    Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
    elrayle and tamsin johnson committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    79d5e02 View commit details
    Browse the repository at this point in the history
  4. Update spec/services/hyrax/collections/nested_collection_persistence_…

    …service_spec.rb
    
    Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
    elrayle and tamsin johnson committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    d7ada14 View commit details
    Browse the repository at this point in the history
  5. Update spec/services/hyrax/collections/nested_collection_persistence_…

    …service_spec.rb
    
    Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
    elrayle and tamsin johnson committed Aug 17, 2021
    Configuration menu
    Copy the full SHA
    387877b View commit details
    Browse the repository at this point in the history