Closed tpendragon closed 4 years ago
After doing some exploration, I'm fairly confident that Collections don't preserve their members. While Collections can access a members method through a inverse relationship in the Wayfinder, they do not have a member_ids
property. Currently we check for member_ids in order to preserve children:
https://github.com/pulibrary/figgy/blob/master/app/services/preserver.rb#L82
We should add a test that will prevent a regression in the future, but I think this is a non-issue otherwise.
https://github.com/pulibrary/figgy/blob/master/app/services/preserver.rb#L82
Thanks! We should definitely add a test though - there's been proposals to make member_ids
on all Valkyrie::Resource
s.
Added a test in the preserve all PR to ensure that collections aren't preserving their members:
https://github.com/pulibrary/figgy/pull/3436/commits/a3a0031f5f587b2cd55266ff0e53927b2c176dc9
Closing the issue.
This happens right now because
Wayfinder.members
on a collection returns its children, even though the relationship is different (membership stored on child.)