summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--demos/quickstart/protected/pages/Database/ActiveRecord.page2
-rw-r--r--framework/Data/ActiveRecord/TActiveRecord.php24
2 files changed, 13 insertions, 13 deletions
diff --git a/demos/quickstart/protected/pages/Database/ActiveRecord.page b/demos/quickstart/protected/pages/Database/ActiveRecord.page
index a28c3d5e..ce92f489 100644
--- a/demos/quickstart/protected/pages/Database/ActiveRecord.page
+++ b/demos/quickstart/protected/pages/Database/ActiveRecord.page
@@ -1078,7 +1078,7 @@ as the logical column name, they do not need to be listed in <tt>COLUMN_MAPPING<
class UserRecord extends TActiveRecord
{
const TABLE='users';
- protected static $COLUMN_MAPPING=array
+ public static $COLUMN_MAPPING=array
(
'user_id'=>'id',
'email_address'=>'email',
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php
index 20463956..5cc6dee0 100644
--- a/framework/Data/ActiveRecord/TActiveRecord.php
+++ b/framework/Data/ActiveRecord/TActiveRecord.php
@@ -73,7 +73,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelationContext');
* class UserRecord extends TActiveRecord
* {
* const TABLE='users';
- * protected static $COLUMN_MAPPING=array
+ * public static $COLUMN_MAPPING=array
* (
* 'user_id'=>'username',
* 'email_address'=>'email',
@@ -98,16 +98,6 @@ abstract class TActiveRecord extends TComponent
const BELONGS_TO='BELONGS_TO';
const HAS_ONE='HAS_ONE';
- /**
- * @var boolean true if this class is read only.
- */
- private $_readOnly=false;
-
- /**
- * @var TDbConnection database connection object.
- */
- private $_connection;
-
private static $_columnMapping=array();
/**
@@ -117,7 +107,17 @@ abstract class TActiveRecord extends TComponent
* for the corresponding active record class.
* @var array column mapping. Keys: physical column names, values: logical column names.
*/
- protected static $COLUMN_MAPPING=array();
+ public static $COLUMN_MAPPING=array();
+
+ /**
+ * @var boolean true if this class is read only.
+ */
+ private $_readOnly=false;
+
+ /**
+ * @var TDbConnection database connection object.
+ */
+ private $_connection;
/**
* Prevent __call() method creating __sleep() when serializing.