retrieve all the entities if $values is null.