From 89f772d169b44f5b1c84941c62924496ac139b31 Mon Sep 17 00:00:00 2001 From: zYne Date: Sun, 2 Sep 2007 20:13:09 +0000 Subject: [PATCH] --- manual/new/docs/en/configuration.txt | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/manual/new/docs/en/configuration.txt b/manual/new/docs/en/configuration.txt index 81a1cba7b..daa3eea73 100644 --- a/manual/new/docs/en/configuration.txt +++ b/manual/new/docs/en/configuration.txt @@ -95,16 +95,26 @@ SELECT * FROM sometable WHERE id='123' +++ Exporting +The export attribute is used for telling Doctrine what it should export when exporting classes. + +If you don't want to export anything when calling export() you can use: + $manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_NONE); - -+++ Fetching strategy +For exporting tables only (but not constraints) you can use on of the following: -// sets the default collection type (fetching strategy) -$manager->setAttribute(Doctrine::ATTR_FETCHMODE, Doctrine::FETCH_LAZY); +$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_TABLES); +// or you can use +$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL ^ Doctrine::EXPORT_CONSTRAINTS); + + +For exporting everything (tables and constraints) you can use: + + +$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL); +++ Event listener @@ -115,7 +125,9 @@ $manager->setAttribute(Doctrine::ATTR_LISTENER, new MyListener()); ++ Naming convention attributes -Naming convention attributes affect on the naming of different database related elements such as tables, indexes and sequences. +Naming convention attributes affect on the naming of different database related elements such as tables, indexes and sequences. Basically every naming convention attribute has affect in both ways. When importing schemas from the database to classes and when exporting classes into database. + +So for example by default Doctrine naming convention for indexes is %s_idx. Not only do the indexes you set get a special suffix, also the imported classes get their indexes mapped to their non-suffixed equivalents. This applies to all naming convention attributes. +++ Index name format