开发者

Doctrine 2 - MySQL data type Double in YAML

I'm using c开发者_JS百科odeigniter with Doctrine 2 with CodeIgniter2. I used YAML Schema files to define database schema. I want to define two columns in my table with MySQL data-type Double. Below is the YAML Mapping I tried

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

But the code throws error when I try to create Models from YAML.

Entities were created successfully.

The Error Messages are:

Class double does not exist while trying to create proxies

and

Unknown column type double requested while trying to create schema


In 1.2 I think it was 'float' or 'decimal'. Try one of those.

Here's a reference to the 1.2 docs... I'm struggling to find the 2.x docs that say the same thing.

http://www.doctrine-project.org/projects/orm/1.2/docs/manual/defining-models/pl

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜