【发布时间】:2011-08-08 07:22:01
【问题描述】:
这是我的架构的一部分:
sfGuardUser:
actAs: [Timestampable]
columns:
email_address:
type: string(255)
notnull: true
unique: true
algorithm:
type: string(128)
default: sha1
notnull: true
salt: string(128)
password: string(128)
balance:
type: decimal(14)
scale: 4
default: 0
guarantee:
type: decimal(14)
scale: 4
default: 0
is_active:
type: boolean
default: 1
is_super_admin:
type: boolean
default: false
last_login:
type: timestamp
这是夹具数据:
sfGuardUser:
User_admin_1:
email_address: admin@company.com
password: admin
balance: 10000
is_super_admin: true
这是导致失败的吸气剂
class sfGuardUser extends PluginsfGuardUser
{
...
public function getBalance()
{
return (parent::getBalance() - $this->getGuarantee());
}
}
如果我删除 parent::getBalance() 一切正常。有什么问题?
【问题讨论】:
标签: php symfony-1.4 fixtures doctrine-1.2