I'm using symfony 1.4 with doctrine as my ORM, I need to do one of two thing to get it working, and I don't know how to do it.
the id fields should not be bigint, j开发者_StackOverflowust int or
When I define my table as follows:
Table: columns: id: type: integer autoincrement: true primary: true
make the autoincrement work, because if I define my id like so it won't autoincrement it.
Autoincremented Id keys are automatically added by Doctrine if you do not specify one explicitly.
This should work as expected:
columns:
nextfield: string
or:
columns:
id:
type: integer(2)
autoincrement: true
primary: true
nextfield: string
For the integer data type, check this out: http://www.symfony-project.org/doctrine/1_2/en/04-Schema-Files
For the auto-increment...
primary: true
autoincrement: true
... should be all you need.
精彩评论