Something like this 

```ruby
      criteria = entities
        .reject { |id, entity| entity.nil? }
        .map  do |id, entity|
          { id: id, since_version: entity.version }
        end
```