1
0
mirror of synced 2024-12-15 15:46:02 +03:00
doctrine2/manual/docs/Object relational mapping - Record identifiers - Autoincremented.php
2007-04-13 21:49:11 +00:00

12 lines
397 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>