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

Conversation

elrayle
Copy link
Contributor

@elrayle elrayle commented Aug 17, 2021

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.

Partially addresses #5071

@samvera/hyrax-code-reviewers

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.
Copy link
Member

@no-reply no-reply left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the hard test requirements on eq [] will come back to bite us (many of our valkyrie query implementations are optimized to be more lazy than this, and return other Enumerable types.

i've added some suggestions. otherwise, this looks great to me.

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 and others added 3 commits August 17, 2021 14:00
…service_spec.rb


To support lazy loading with enumerables, it is better to check for empty.

Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
…service_spec.rb

Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
…service_spec.rb

Co-authored-by: tamsin johnson <tomjohnson@ucsb.edu>
@no-reply no-reply merged commit ca6beba into main Aug 17, 2021
@no-reply no-reply deleted the wings/5071_mem_of_cols branch August 17, 2021 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants