我需要将网站从一个托管移动到另一个托管,有一个使用Zend框架的php应用程序。 移动文件和数据库我设法重新配置数据库访问,但页面上出现错误:
Fatal error:
Uncaught Doctrine_Record_UnknownPropertyException: Unknown record property / related component "Array" on "Model_User_Group" in /home/oneclou3/public_html/app/library/Doctrine/Record/Filter/Standard.php:55
Stack trace:
#0 /home/oneclou3/public_html/app/library/Doctrine/Record.php(1395): Doctrine_Record_Filter_Standard->filterGet(Object(Model_User_Group), 'Array')
#1 /home/oneclou3/public_html/app/library/Doctrine/Record.php(1350): Doctrine_Record->_get('Array', true)
#2 /home/oneclou3/public_html/app/library/Doctrine/Access.php(72): Doctrine_Record->get('Array')
#3 /home/oneclou3/public_html/app/library/Doctrine/Query/Abstract.php(1121): Doctrine_Access->__get('Array')
#4 /home/oneclou3/public_html/app/library/Doctrine/Query/Abstract.php(1008): Doctrine_Query_Abstract->_preQuery(Array)
#5 /home/oneclou3/public_html/app/library/Doctrine/Table.php(1649): Doctrine_Query_Abstract->execute(Array, 3)
#6 /home/oneclou3/public_html/app/library/Zex/Auth/Abstract.php(229): Doctrine_Table->findAll(3)
#7 /home/oneclou3/p in /home/oneclou3/public_html/app/library/Doctrine/Record/Filter/Standard.php on line 55
我不确定如何解决这个问题,Model_User_Group只是扩展了一个基类:
<?php
/**
* Model_User_Group
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
class Model_User_Group extends BaseModel_User_Group
{
}
碱
<?php
/**
* BaseModel_User_Group
*
* This class has been auto-generated by the Doctrine ORM Framework
*
* @property integer $id
* @property string $title
* @property string $uid
* @property string $model
* @property Doctrine_Collection $Model_User
*
* @package ##PACKAGE##
* @subpackage ##SUBPACKAGE##
* @author ##NAME## <##EMAIL##>
* @version SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
*/
abstract class BaseModel_User_Group extends Doctrine_Record
{
public function setTableDefinition()
{
$this->setTableName('groups');
$this->hasColumn('id', 'integer', 4, array(
'type' => 'integer',
'primary' => true,
'autoincrement' => true,
'length' => '4',
));
$this->hasColumn('title', 'string', 255, array(
'type' => 'string',
'notnull' => true,
'length' => '255',
));
$this->hasColumn('uid', 'string', 50, array(
'type' => 'string',
'notnull' => true,
'length' => '50',
));
$this->hasColumn('model', 'string', 255, array(
'type' => 'string',
'notnull' => true,
'length' => '255',
));
$this->index('uid', array(
'fields' =>
array(
0 => 'uid',
),
'type' => 'unique',
));
$this->option('collate', 'utf8_general_ci');
$this->option('charset', 'utf8');
$this->option('type', 'InnoDB');
}
public function setUp()
{
parent::setUp();
$this->hasMany('Model_User', array(
'local' => 'id',
'foreign' => 'groups_id'));
$timestampable0 = new Doctrine_Template_Timestampable();
$this->actAs($timestampable0);
}
}
不确定我需要提供什么,提前谢谢。