N°4031 - OQL Error when AttributeObjectKey is used in JOIN condition

This commit is contained in:
Eric
2021-06-02 14:45:03 +02:00
parent 7168860a0b
commit 71fcc6f026
2 changed files with 16 additions and 1 deletions

View File

@@ -720,4 +720,19 @@ class DBSearchTest extends ItopDataTestCase
/** @var \DBObjectSearch $oNestedSearchInExpression */
self::assertEquals($bAllowAllData, $oNestedSearchInExpression->IsAllDataAllowed(), 'Nested DBSearch AllowData value');
}
/**
* BUG N°4031 check AttributeObjectKey used in JOIN condition
* @throws \ConfigException
* @throws \CoreException
* @throws \MissingQueryArgument
* @throws \OQLException
*/
public function testAttributeObjectKey()
{
$sQuery = "SELECT II FROM InlineImage AS II JOIN UserRequest AS UR ON II.item_id = UR.id WHERE II.item_class = 'UserRequest'";
$oSearch = \DBObjectSearch::FromOQL($sQuery);
$oSearch->MakeSelectQuery();
self::assertTrue(true);
}
}