+ "' collection but a reference was found for this type to another collection, '" + dbRef.getRef()
+ "'. The reference will be loaded using the class anyway. " + dbRef);
}
final boolean exists;
if (idOnly) {
exists = (dsi.find(dbColl.getName(), c).disableValidation().filter("_id", ref).asKeyList().size() == 1);
} else {
exists = (dsi.find(dbRef.getRef(), c).disableValidation().filter("_id", dbRef.getId()).asKeyList().size() == 1);
}
cache.notifyExists(key, exists);
return exists;