diff --git a/core/model/DataObject.php b/core/model/DataObject.php index 9f38ee7d5..edafc664a 100644 --- a/core/model/DataObject.php +++ b/core/model/DataObject.php @@ -2,6 +2,12 @@ /** * A single database record & abstract class for the data-access-model. * + *

Extensions and Decorators

+ * + * See {@link Extension} and {@link DataObjectDecorator}. + * + *

Permission Control

+ * * Object-level access control by {@link Permission}. Permission codes are arbitrary * strings which can be selected on a group-by-group basis. * @@ -53,6 +59,10 @@ * If any public method on this class is prefixed with an underscore, * the results are cached in memory through {@link cachedCall()}. * + * + * @todo Add instance specific removeExtension() which undos loadExtraStatics() + * and defineMethods() + * * @package sapphire * @subpackage model */ @@ -1934,6 +1944,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity * @return boolean */ public function hasDatabaseField($field) { + // Add base fields which are not defined in static $db $fixedFields = array( 'ID' => 'Int', 'ClassName' => 'Enum', @@ -1943,8 +1954,7 @@ class DataObject extends ViewableData implements DataObjectInterface, i18nEntity 'Version' => $this->hasExtension('Versioned') ? 'Int' : false, ); - // Add base fields which are not defined in static $db - if(isset($fixedFields[$field])) return (bool)$fixedFields[$field]; + if(isset($fixedFields[$field])) return true; return array_key_exists($field, $this->inheritedDatabaseFields()); }