Alex Rivera | Logout

Doctrine 2 + unsigned value

Asked 2011-10-07T20:43:16.120
83

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

Edit
Report

1 Answer

143
/**
 * @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
answered 2013-01-08T18:49:58.867

Your Answer