protected function _prepareQueryConditions(&$conditions) {
		if (empty($conditions) || !is_array($conditions)) {
			return;
		}

		$bindFields = $this->_getListFieldsUpdateQueryConditions();
		$newConditions = [];
		foreach ($conditions as $field => &$value) {
			if (ctype_digit((string)$field)) {
				$field = $value;
			}

			if (in_array($field, ['AND', 'OR', 'NOT']) && is_array($value)) {
				$this->_prepareQueryConditions($value);
				continue;
			}

			if (!is_string($field)) {
				continue;
			}

			foreach ($bindFields as $bindField => $bindFieldInfo) {
				$fieldName = $field;
				if (strpos($fieldName, ' ') !== false) {
					$fieldName = explode(' ', $fieldName, 2);
					$fieldName = array_shift($fieldName);
				}
				if ($fieldName !== $this->alias . '.' . $bindField) {
					continue;
				}

				unset($conditions[$field]);
				$field = str_replace($this->alias . '.' . $bindField, $bindFieldInfo['replace'], $field);
				if (!isset($bindFieldInfo['subQuery'])) {
					$newConditions[$field] = $value;
					continue;
				}

				$conditionsSubQuery = [$field => $value];
				$db = $this->getDataSource();
				$subQuery = $db->buildStatement(
					[
						'limit' => null,
						'offset' => null,
						'joins' => [],
						'conditions' => $conditionsSubQuery,
						'order' => null,
						'group' => null
					] + $bindFieldInfo['subQuery'],
					$this
				);
				$subQuery = 'Employee.id IN (' . $subQuery . ') ';
				$subQueryExpression = $db->expression($subQuery);

				$newConditions[] = $subQueryExpression;
			}
		}
		$conditions = array_merge($conditions, $newConditions);
	}