And*_*eas 5 doctrine symfony1 symfony-1.4
我在构建模型时收到此错误消息:
When using the attribute ATTR_AUTO_ACCESSOR_OVERRIDE you cannot use the field name "attribute" ...
Run Code Online (Sandbox Code Playgroud)
问题是,我必须使用此字段名称,因为它位于由virtuemart创建和使用的表中.别名也不起作用.
product_attribute: { name: product_attribute as attribute, type: clob(16777777) }
Run Code Online (Sandbox Code Playgroud)
那么,我该怎么办?我可以ATTR_AUTO_ACCESSOR_OVERRIDE关闭或者我遇到问题吗?万一我可以,我怎么能这样做?
ATTR_AUTO_ACCESSOR_OVERRIDE关闭会有问题吗?如果有一个(或更多),它会是什么?
我很感谢任何建议!
附加信息:
BaseJosVmProduct中的定义: @property clob $product_attribute
的schema.yml:
JosVmProduct:
columns:
product_id: { type: int, notnull: true, unique: true, primary: true, autoincrement: true }
vendor_id: { type: int, notnull: true, default: 0 }
product_parent_id: { type: int, notnull: true, default: 0 }
product_sku: { type: string(64), , notnull: true, default: '' }
product_s_desc: { type: string(255), default: null }
product_desc: { type: clob(16777777) }
product_thumb_image: { type: string(255), default: null }
product_full_image: { type: string(255), default: null }
product_publish: { type: string(1), default: null }
product_weight: { type: decimal(10), scale: 4, default: null }
product_weight_uom: { type: string(32), default: 'pounds.' }
product_length: { type: decimal(10), scale: 4, default: null }
product_width: { type: decimal(10), scale: 4, default: null }
product_height: { type: decimal(10), scale: 4, default: null }
product_lwh_uom: { type: string(32), default: 'inches' }
product_url: { type: string(255), default: null }
product_in_stock: { type: int, default: null }
product_available_date: { type: int, default: null }
product_availability: { type: string(56), notnull: true, default: '' }
product_special: { type: string(1), default: null }
product_discount_id: { type: int, default: null }
ship_code_id: { type: int, default: null }
cdate: { type: int, default: null }
mdate: { type: int, default: null }
product_name: { type: string(64), default: null }
product_sales: { type: int, notnull: true, default 0 }
product_attribute: { name: product_attribute as attribute, type: clob(16777777) }
custom_attribute: { type: clob(16777777), notnull: true }
product_tax_id: { type: int(2), notnull: true, default: '0' }
product_unit: { type: string(32), default: null }
product_packaging: { type: int, default: null }
webinar_duration: { type: string(50), default: null }
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1097 次 |
| 最近记录: |