1
0
mirror of synced 2024-12-13 22:56:04 +03:00
doctrine2/manual/docs/Object relational mapping - Record identifiers - Autoincremented.php

12 lines
407 B
PHP

Autoincrement primary key is the most basic identifier and its usage is strongly encouraged. Sometimes you may want to use some other name than 'id'
for your autoinc primary key. It can be specified as follows:
<code type="php">
class User extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('uid','integer',20,'primary|autoincrement');
}
}
</code>