/**
* Finds other resources which are referring to the same resource data and filename
*
* @param PersistentResource $resource The resource used for finding similar resources
* @return QueryResultInterface The result, including the given resource
*/
public function findSimilarResources(PersistentResource $resource)
{
$query = $this->createQuery();
$query->matching($query->logicalAnd($query->equals('sha1', $resource->getSha1()), $query->equals('filename', $resource->getFilename())));
return $query->execute();
}