N°2272 - OQL performance (empty class alias)

This commit is contained in:
Eric
2019-09-25 17:43:00 +02:00
parent e0374dd186
commit ff3ec219ef
4 changed files with 44 additions and 6 deletions

View File

@@ -13,6 +13,7 @@ define('PRECISION', 2);
use CMDBSource;
use Combodo\iTop\Test\UnitTest\ItopDataTestCase;
use DBObjectSearch;
use DBSearch;
use MetaModel;
use SetupUtils;
@@ -35,6 +36,15 @@ class OQLToSQLAllCLassesTest extends ItopDataTestCase
SetupUtils::builddir(APPROOT.'log/test/OQLToSQL');
}
public function testEmptyAlias()
{
$oFilter = new DBObjectSearch('Organization', '');
$oFilter->AllowAllData();
$sSQL = $oFilter->MakeSelectQuery();
CMDBSource::Query($sSQL);
$this->assertTrue(true);
}
private function GetPreviousTestResult($sTestId)
{
$sResultFile = APPROOT.'log/test/OQLToSQL/'.$sTestId.'.txt';