If all the entity_ids that were provided do not exist we would end up passing an empty list of ids to the SQL query which would do an unbounded select