diff --git a/core/dbobject.class.php b/core/dbobject.class.php index 0163fb1b5..ab01de12e 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -3406,7 +3406,7 @@ abstract class DBObject implements iDisplay throw new Exception('Missing argument #1: source attribute'); } $sSourceKeyAttCode = $aParams[0]; - if (!MetaModel::IsValidAttCode(get_class($oObjectToRead), $sSourceKeyAttCode)) + if (($sSourceKeyAttCode != 'id') && !MetaModel::IsValidAttCode(get_class($oObjectToRead), $sSourceKeyAttCode)) { throw new Exception("Unknown attribute ".get_class($oObjectToRead)."::".$sSourceKeyAttCode); }