EntityBase::areFieldsCompatibleWithOrm

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. EntityBase
  4. areFieldsCompatibleWithOrm
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entity/entitybase.php
  • Класс: Bitrix\Crm\Entity\EntityBase
  • Вызов: EntityBase::areFieldsCompatibleWithOrm
protected function areFieldsCompatibleWithOrm(array $fields): bool
{
	$notCompatibleFields = [
		'SEARCH_CONTENT',
	];

	$dbEntity = $this->getDbEntity();
	$sqlWhere = new \CSQLWhere();
	try
	{
		foreach ($fields as $field)
		{
			$field = $sqlWhere->makeOperation($field)['FIELD']; // remove filter operations like >, <, % etc
			if (in_array($field, $notCompatibleFields))
			{
				return false;
			}
			\Bitrix\Main\ORM\Query\Chain::getChainByDefinition($dbEntity, $field);
		}
	}
	catch (\Bitrix\Main\SystemException $e) // Unknown field definition
	{
		return false;
	}

	return true;
}

Добавить комментарий