Hi guys,
I am using relatinal query like such:
$folders=User::model()->findByPk($id)->folders;
the relation is defined in User model as:
'has_folder'=>array(self::HAS_MANY,'UserFolder','user_id'),
'folders'=>array(self::HAS_MANY,'Folder','folder_id','through'=>'has_folder'),
the query works but returns a lot of extra data in the array.
Array
(
[0] => Folder Object
(
[_md:CActiveRecord:private] => CActiveRecordMetaData Object
(
[tableSchema] => CMysqlTableSchema Object
(
[schemaName] =>
[name] => folder
[rawName] => `folder`
[primaryKey] => id
[sequenceName] =>
[foreignKeys] => Array
(
)
[columns] => Array
(
[id] => CMysqlColumnSchema Object
(
[name] => id
[rawName] => `id`
[allowNull] =>
[dbType] => bigint(20)
[type] => string
[defaultValue] =>
[size] => 20
[precision] => 20
[scale] =>
[isPrimaryKey] => 1
[isForeignKey] =>
[autoIncrement] => 1
[_e:CComponent:private] =>
[_m:CComponent:private] =>
I want to filter out only clean folder data corresonping to the table column in a array. any pointer appreciated.