Permalink
Browse files

add paragraph about 'doctrine_type_mappings' + config example

  • Loading branch information...
1 parent 13676dc commit 2df70ceda77627b7b62ef1a414e7dc992dd084ec @basz basz committed Jul 23, 2012
Showing with 22 additions and 0 deletions.
  1. +22 −0 docs/EXTRAS_ORM.md
View
@@ -92,3 +92,25 @@ class User
protected $houses;
}
```
+
+To have Schema-Tool convert the underlying database type of your new "tinyint" directly into an instance
+of TinyIntType you have to additionally register this mapping with your database platform.
+
+```php
+<?php
+return array(
+ 'doctrine' => array(
+ 'connection' => array(
+ 'orm_default' => array(
+ 'doctrine_type_mappings' => array(
+ 'tinyint' => 'tinyint',
+ ),
+ ),
+ ),
+ ),
+);
+```
+
+Now using Schema-Tool, whenever it detects a column having the "tinyint" it will convert it into a "tinyint"
+Doctrine Type instance for Schema representation. Keep in mind that you can easily produce clashes this
+way, each database type can only map to exactly one Doctrine mapping type.

0 comments on commit 2df70ce

Please sign in to comment.