/**
  * Append Query Deleted field
  *
  * @param Query             &$query Query Module
  * @param NgModelSoftDelete $model  Model base
  *
  * @return void
  */
 protected function querySoftDelete(Query &$query, NgModelSoftDelete $model)
 {
     if (!$model::useSoftDelete()) {
         return;
     }
     if (empty($model::getDeletedField())) {
         return;
     }
     $field = $model::getDeletedField();
     if (!is_string($field)) {
         return;
     }
     $query->appendCondition(new SimpleCondition($field, Operator::OP_EQUALS, NgModelSoftDelete::VALUE_NOTDEL));
 }
 public function retrieveAllByIds(NgModel $model, array $ids)
 {
     $query = new Query();
     $query->addCondition(new ArrayCondition($model::getPrimaryKey(), Operator::OP_EQUALS, $ids));
     return $this->retrieveAll($model, $query);
 }