我使用的代码点火器与Doctrine 2与CodeIgniter2。我使用YAML架构文件来定义数据库架构。我想用MySQL数据类型Double在我的表中定义两列。下面是我尝试过的YAML映射
Entities\Location:
type: entity
table: locations
fields:
id:
type: integer
id: true
generator:
strategy: AUTO
Name:
type: string
length: 40
nullable: false
longitude:
type: double
latitude:
type: double但是,当我试图从YAML创建模型时,代码会抛出错误。
实体已成功创建。
错误消息是:
类double在创建代理时不存在
和
未知列类型双重请求的,同时尝试创建模式
发布于 2011-07-13 15:06:47
在1.2中,我认为是“浮点数”或“小数点”。试试看。
以下是1.2文档的参考资料..。我很难找到说同样的东西的2.x文档。
http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/pl
https://stackoverflow.com/questions/6680927
复制相似问题