From 1ff90159d6af5b9c9cc8002bb48c5396a8d019a1 Mon Sep 17 00:00:00 2001 From: zYne Date: Fri, 29 Sep 2006 10:58:38 +0000 Subject: [PATCH] Updated docs --- ...started - Record identifiers - Natural.php | 2 + ...efinition - Constraints and validators.php | 244 +++++++++++++++--- 2 files changed, 211 insertions(+), 35 deletions(-) diff --git a/manual/docs/Getting started - Record identifiers - Natural.php b/manual/docs/Getting started - Record identifiers - Natural.php index e69de29bb..4dc0d94c2 100644 --- a/manual/docs/Getting started - Record identifiers - Natural.php +++ b/manual/docs/Getting started - Record identifiers - Natural.php @@ -0,0 +1,2 @@ +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. diff --git a/manual/docs/Getting started - Setting table definition - Constraints and validators.php b/manual/docs/Getting started - Setting table definition - Constraints and validators.php index 4063fc442..d48c9fd0a 100644 --- a/manual/docs/Getting started - Setting table definition - Constraints and validators.php +++ b/manual/docs/Getting started - Setting table definition - Constraints and validators.php @@ -1,35 +1,209 @@ -Following data types and constraints are availible in doctrine - +Following attributes are availible for columns + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ name + + args + + description +
+
+
+ »» Basic attributes +
+
+ primary + + bool true + + Defines column as a primary key column. +
+ autoincrement + + bool true + + Defines column as autoincremented column. If the underlying database doesn't support autoincrementation natively its emulated with triggers and sequence tables. +
+ default + + mixed default + + Sets default as an application level default value for a column. When default value has been set for a column every time a record is created the specified column has the default as its value. +
+ enum + + array enum + + Sets enum as an application level enum value list for a column. +
+ »» Basic validators +
+
+ unique + + bool true + + Acts as database level unique constraint. Also validates that the specified column is unique. +
+ nospace + + bool true + + Nospace validator. This validator validates that specified column doesn't contain any space/newline characters.
+ +
+ notblank + + bool true + + Notblank validator. This validator validates that specified column doesn't contain only space/newline characters. Useful in for example comment posting applications + where users are not allowed to post empty comments. +
+ notnull + + bool true + + Acts as database level notnull constraint as well as notnull validator for the specified column. +
+ »» Advanced validators +
+
+ email + + bool true + + Email validator. Validates that specified column is a valid email address. +
+ date + + bool true + + Date validator. +
+ range + + array(min, max) + + Range validator. Validates that the column is between min and max. +
+ country + + bool true + + Country code validator validates that specified column has a valid country code. +
+ regexp + + string regexp + + Regular expression validator validates that specified column matches regexp. +
+ ip + + bool true + + Ip validator validates that specified column is a valid internet protocol address. +
+ usstate + + bool true + + Usstate validator validates that specified column is a valid usstate. +
+