Closed jcoyne closed 5 years ago
The problem is that ActiveFedora::DirectlyContainsAssocation#find_target
attempts to get the resources from the graph by doing:
query_node.resource.query(predicate: container_predicate)
When the object is loaded from solr, the query_node.resource
evaluates to an object of type ActiveFedora::LoadableFromJson::SolrBackedResource
. When you run the query, for http://pcdm.org/models#hasFile
, it returns an empty set.
The :files
reflection doesn't have a :predicate
, instead it has a has_member_relation
. So the SolrBackedResource
can't find the correct reflection. Even if it did find the correct reflection, the values are not indexed, so there's nothing to retrieve.
This PR should keep this from happening in a silent way: https://github.com/projecthydra/active_fedora/pull/951