1
0
mirror of synced 2024-12-16 08:06:02 +03:00
doctrine2/manual/docs/Object relational mapping - Record identifiers - Natural.php

11 lines
419 B
PHP
Raw Normal View History

2007-04-14 01:49:11 +04:00
Natural identifier is a property or combination of properties that is unique and non-null. The use of natural identifiers
is discouraged. You should consider using autoincremented or sequential primary keys as they make your system more scalable.
2007-04-14 01:49:11 +04:00
<code type="php">
class User extends Doctrine_Record {
public function setTableDefinition() {
$this->hasColumn('name','string',200,'primary');
}
}
</code>