this can be moved to \RestfulEntityBase::getQueryForList()``