Support for objects to go "out of the silo" during a transition by making sure that we can reload an object we've just saved.

SVN:trunk[4144]
This commit is contained in:
Denis Flaven
2016-05-25 12:32:32 +00:00
parent fc4c3c9bb9
commit 22f73506a2

View File

@@ -192,10 +192,10 @@ abstract class DBObject implements iDisplay
return true;
}
public function Reload()
public function Reload($bAllowAllData = false)
{
assert($this->m_bIsInDB);
$aRow = MetaModel::MakeSingleRow(get_class($this), $this->m_iKey, false/*, $this->m_bAllowAllData*/);
$aRow = MetaModel::MakeSingleRow(get_class($this), $this->m_iKey, false /* must be found */, $bAllowAllData/* in the future $this->m_bAllowAllData ??*/);
if (empty($aRow))
{
throw new CoreException("Failed to reload object of class '".get_class($this)."', id = ".$this->m_iKey);
@@ -1948,7 +1948,7 @@ abstract class DBObject implements iDisplay
// Reload to get the external attributes
if ($bHasANewExternalKeyValue)
{
$this->Reload();
$this->Reload(true /* AllowAllData */);
}
else
{