diff --git a/manual/codes/Basic Components - RawSql - Adding components.php b/manual/codes/Basic Components - RawSql - Adding components.php index 392a73388..be3f2ff44 100644 --- a/manual/codes/Basic Components - RawSql - Adding components.php +++ b/manual/codes/Basic Components - RawSql - Adding components.php @@ -7,7 +7,7 @@ $query->parseQuery("SELECT {entity.*}, {phonenumber.*} ON phonenumber.entity_id = entity.id"); $query->addComponent("entity", "Entity"); -$query->addComponent("phonenumber", "Phonenumber"); +$query->addComponent("phonenumber", "Entity.Phonenumber"); $entities = $query->execute(); ?> diff --git a/manual/docs/Advanced components - View - Using views.php b/manual/docs/Advanced components - View - Using views.php index e69de29bb..d3f5a12fa 100644 --- a/manual/docs/Advanced components - View - Using views.php +++ b/manual/docs/Advanced components - View - Using views.php @@ -0,0 +1 @@ + diff --git a/manual/docs/Basic Components - RawSql - Adding components.php b/manual/docs/Basic Components - RawSql - Adding components.php index e69de29bb..39919f33e 100644 --- a/manual/docs/Basic Components - RawSql - Adding components.php +++ b/manual/docs/Basic Components - RawSql - Adding components.php @@ -0,0 +1,6 @@ +The following example represents a bit harder case where we select all entities and their associated phonenumbers using a left join. Again we +wrap all the columns in curly brackets but we also specify what tables associate to which components. +

+First we specify that table entity maps to record class 'Entity' +

+Then we specify that table phonenumber maps to Entity.Phonenumber (meaning phonenumber associated with an entity) diff --git a/manual/docs/Basic Components - RawSql - Introduction.php b/manual/docs/Basic Components - RawSql - Introduction.php index e69de29bb..2deb1d519 100644 --- a/manual/docs/Basic Components - RawSql - Introduction.php +++ b/manual/docs/Basic Components - RawSql - Introduction.php @@ -0,0 +1,4 @@ +In Doctrine you may express your queries in the native SQL dialect of your database. +This is useful if you want to use the full power of your database vendor's features (like query hints or the CONNECT keyword in Oracle). +

+It should be noted that not all the sql is portable. So when you make database portable applications you might want to use the DQL API instead. diff --git a/manual/docs/Basic Components - RawSql - Using SQL.php b/manual/docs/Basic Components - RawSql - Using SQL.php index e69de29bb..5bc392372 100644 --- a/manual/docs/Basic Components - RawSql - Using SQL.php +++ b/manual/docs/Basic Components - RawSql - Using SQL.php @@ -0,0 +1,10 @@ +The rawSql component works in much same way as Zend_Db_Select. You may use method overloading like $q->from()->where() or just use +$q->parseQuery(). There are some differences though: +

+1. In Doctrine_RawSql component you need to specify all the mapped table columns in curly brackets {} this is used for smart column aliasing. +

+2. When joining multiple tables you need to specify the component paths with addComponent() method +

+The following example represents a very simple case where no addComponent() calls are needed. +Here we select all entities from table entity with all the columns loaded in the records. +