public function &__get($property) { $value = parent::__get($property); // I removed the Lazy condition because selectAll() defaults to MAPPINGS_NONE. -- cwells // if (is_null($value) && isset(self::$dbMappings[$this->className][$property]) && self::$dbMappings[$this->className][$property]->Lazy && is_callable(static::$mappingLoader)) { if (is_null($value) && isset(self::$dbMappings[$this->className][$property]) && is_callable(static::$mappingLoader)) { // This property has a lazy-loaded DB mapping, so load it now. -- cwells if (call_user_func(static::$mappingLoader, $this, $property, self::$dbMappings[$this->className][$property])) { return $this->properties[$property]; } } return $value; }