From 5dd9d8d88debb8979b0585c295798528903bd2f6 Mon Sep 17 00:00:00 2001 From: romanb Date: Sat, 16 Sep 2006 10:25:57 +0000 Subject: [PATCH] Closed #46, column naming docs. (does it need a code block?). --- ...etting table definition - Field(Column) naming.php | 11 +++++++++++ manual/documentation.php | 3 ++- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 manual/docs/Getting started - Setting table definition - Field(Column) naming.php diff --git a/manual/docs/Getting started - Setting table definition - Field(Column) naming.php b/manual/docs/Getting started - Setting table definition - Field(Column) naming.php new file mode 100644 index 000000000..34b1568b5 --- /dev/null +++ b/manual/docs/Getting started - Setting table definition - Field(Column) naming.php @@ -0,0 +1,11 @@ +One problem with database compatibility is that many databases differ in their behaviour of how the result set of a +query is returned. MySql leaves the field names unchanged, which means if you issue a query of the form +"SELECT myField FROM ..." then the result set will contain the field 'myField'. Unfortunately, this is +just the way MySql and some other databases do it. Postgres for example returns all field names in lowercase +whilst Oracle returns all field names in uppercase. "So what? In what way does this influence me when using Doctrine?", +you may ask. Fortunately, you don't have to bother about that issue at all. Doctrine takes care of this problem +transparently. That means if you define a derived Record class and define a field called 'myField' you will always +access it through $record->myField (or $record['myField'], whatever you prefer) no matter whether you're using MySql +or Postgres or Oracle ect.
+
+In short: You can name your fields however you want, using under_scores, camelCase or whatever you prefer. \ No newline at end of file diff --git a/manual/documentation.php b/manual/documentation.php index d942b01f9..c5ea62856 100644 --- a/manual/documentation.php +++ b/manual/documentation.php @@ -97,7 +97,8 @@ $menu = array("Getting started" => "Data types and lengths", "Constraints and validators", "Default values", - "Enum emulation" + "Enum emulation", + "Field(Column) naming" ), "Record identifiers" => array( "Introduction",