Doctrine 2 + unsigned value

前端 未结 5 1718
闹比i
闹比i 2021-01-31 13:21

Is it possible to specify a column type of unsigned integer in Doctrine 2?

5条回答
  •  别那么骄傲
    2021-01-31 13:45

    /**
     * @ORM\Column(name="id", type="integer", options={"unsigned"=true})
     */
    

    There is no place in the doc (that I've seen) that speak about this, but it works.

    Update

    Definition in Yaml (as of 2.4 for primary key)

    id:
      type: integer
      options:
        unsigned: true
    

提交回复
热议问题