2007-04-14 01:49:11 +04:00
|
|
|
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:
|
2007-04-13 00:52:30 +04:00
|
|
|
|
2007-04-14 01:49:11 +04:00
|
|
|
<code type="php">
|
|
|
|
class User extends Doctrine_Record {
|
|
|
|
public function setTableDefinition() {
|
|
|
|
$this->hasColumn('uid','integer',20,'primary|autoincrement');
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</code>
|