Last active
July 4, 2022 07:41
-
-
Save dima731515/bffd1520b957cf5b130b66d059c4d04e to your computer and use it in GitHub Desktop.
Битрикс ORM getList, join (связная сущность) с дополнительными условиями.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$userId = 23; | |
... | |
new ReferenceField( | |
'IS_VISIT', | |
getHLEntityClassNameById(VIEWED_HL_BLOCK_ID), | |
[ | |
'=this.ID' => 'ref.UF_ELEMENT_ID', | |
'=ref.UF_ENTITY_CODE' => new \Bitrix\Main\DB\SqlExpression('?i', 'case'), | |
'=ref.UF_USER_ID' => new \Bitrix\Main\DB\SqlExpression('?i', $userId) | |
], | |
['join_type' => 'LEFT'] | |
) | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment