mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-01 22:48:45 +02:00
#348 Multi-column queries not working fine with open joins and if null values to be displayed
SVN:trunk[1115]
This commit is contained in:
@@ -207,15 +207,20 @@ abstract class DBObject
|
||||
// #@# Bug ?
|
||||
throw new CoreException("Missing key for class '".get_class($this)."'");
|
||||
}
|
||||
else
|
||||
|
||||
$iPKey = $aRow[$sKeyField];
|
||||
if (!self::IsValidPKey($iPKey))
|
||||
{
|
||||
$iPKey = $aRow[$sKeyField];
|
||||
if (!self::IsValidPKey($iPKey))
|
||||
if (is_null($iPKey))
|
||||
{
|
||||
throw new CoreWarning("An object id must be an integer value ($iPKey)");
|
||||
throw new CoreException("Missing object id in query result (found null)");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new CoreException("An object id must be an integer value ($iPKey)");
|
||||
}
|
||||
$this->m_iKey = $iPKey;
|
||||
}
|
||||
$this->m_iKey = $iPKey;
|
||||
|
||||
// Build the object from an array of "attCode"=>"value")
|
||||
//
|
||||
@@ -1434,6 +1439,7 @@ abstract class DBObject
|
||||
$oSet = $this->GetMasterReplica();
|
||||
while($aData = $oSet->FetchAssoc())
|
||||
{
|
||||
// Assumption: $aData['datasource'] will not be null because the data source id is always set...
|
||||
$oReplica = $aData['replica'];
|
||||
$oSource = $aData['datasource'];
|
||||
$oAttrSet = $oSource->Get('attribute_list');
|
||||
|
||||
Reference in New Issue
Block a user