В
$factory-get($this->computeQueueChannel(...$parameters))->push($message);
Size: a a a
В
$factory-get($this->computeQueueChannel(...$parameters))->push($message);
DS
В
DS
IS
sql
SELECT "documents".*,"dup".*
FROM "documents"
LEFT JOIN "documents" "dup"
ON ("documents"."filehash" = "dup"."filehash"
AND "documents"."company_id" = "dup"."company_id"
AND "documents"."id" != "dup"."id"
)
WHERE "documents"."company_id"='5'
return $this->hasMany(Document::class, ['filehash' => 'filehash', 'company_id'=>'company_id])->alias('dup')запрос немного по другому будет выглядеть, но делать что надо, а с не равенством никак 😞
->onCondition('"dup"."id" != "documents"."id"')
не прокатывает, так как ожидает конкретное значение, а не столбецПА
->onCondition('"dup"."id" != "documents"."id"')
- а если обернуть в new yii\db\Expression?IS
ПА
IS
IS
IS
IS
* Note that this condition is applied in case of a join as well as when fetching the related records.
* Thus only fields of the related table can be used in the condition. Trying to access fields of the primary
* record will cause an error in a non-join-query.
В
D
IS
IS
D
D
D
order
.* FROM order
LEFT JOIN item
dup
ON (order
.item_id
= dup
.id
) AND (dup.id22=order.item_id22)