Commit 4aab1572 authored by zYne's avatar zYne

Docs menu updated

parent cb79beca
Unique constraints ensure that the data contained in a column or a group of columns is unique with respect to all the rows in the table. Unique constraints ensure that the data contained in a column or a group of columns is unique with respect to all the rows in the table.
In general, a unique constraint is violated when there are two or more rows in the table where the values of all of the columns included in the constraint are equal. However, two null values are not considered equal in this comparison. That means even in the presence of a unique constraint it is possible to store duplicate rows that contain a null value in at least one of the constrained columns. This behavior conforms to the SQL standard, but some databases do not follow this rule. So be careful when developing applications that are intended to be portable.
The following definition uses a unique constraint for column 'name'. The following definition uses a unique constraint for column 'name'.
<code type='php'> <code type='php'>
...@@ -27,4 +29,4 @@ class User extends Doctrine_Record ...@@ -27,4 +29,4 @@ class User extends Doctrine_Record
$this->unique(array('name', 'age')); $this->unique(array('name', 'age'));
} }
} }
</code> </code>
...@@ -43,6 +43,7 @@ Object relational mapping ...@@ -43,6 +43,7 @@ Object relational mapping
Constraints and validators Constraints and validators
Introduction Introduction
Notnull Notnull
Unique
Check Check
Record identifiers Record identifiers
Introduction Introduction
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment