support passing query or filter as to of Model::ref