reload (DataMapper::Collection)

    # File lib/dm-core/collection.rb, line 68
        def reload(query = nil)
          query = query.nil? ? self.query.dup : self.query.merge(query)

          # make sure the Identity Map contains all the existing resources
          identity_map = repository.identity_map(model)

          loaded_entries.each do |resource|
            identity_map[resource.key] = resource
          end

          properties = model.properties(repository.name)
          fields     = properties.key | query.fields

          if discriminator = properties.discriminator
            fields |= [ discriminator ]
          end

          # sort fields based on declared order, for more consistent reload queries
          fields = properties & fields

          # replace the list of resources
          replace(all(query.update(:fields => fields, :reload => true)))
        end