diff --git a/manual/docs/Object relational mapping - Constraints and validators - Unique.php b/manual/docs/Object relational mapping - Constraints and validators - Unique.php index 6d4b71bb1..2eb1d2ce7 100644 --- a/manual/docs/Object relational mapping - Constraints and validators - Unique.php +++ b/manual/docs/Object relational mapping - Constraints and validators - Unique.php @@ -1,5 +1,7 @@ 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'. @@ -27,4 +29,4 @@ class User extends Doctrine_Record $this->unique(array('name', 'age')); } } - + diff --git a/manual/menu.php b/manual/menu.php index 647619e3c..d2b688bce 100644 --- a/manual/menu.php +++ b/manual/menu.php @@ -43,6 +43,7 @@ Object relational mapping Constraints and validators Introduction Notnull + Unique Check Record identifiers Introduction