Method: ActiveModel::Datastore::ClassMethods#find_all_entities
- Defined in:
- lib/active_model/datastore.rb
permalink #find_all_entities(ids_or_names, parent) ⇒ Object
Finds entities by keys using the provided array items. Results provided by the dataset ‘find_all` is a Dataset::LookupResults object.
491 492 493 494 495 |
# File 'lib/active_model/datastore.rb', line 491 def find_all_entities(ids_or_names, parent) keys = ids_or_names.map { |id| CloudDatastore.dataset.key name, id } keys.map { |key| key.parent = parent } if parent.present? retry_on_exception { CloudDatastore.dataset.find_all keys } end |