Custom Mapping Types ==================== Doctrine allows you to create new mapping types. This can come in handy when you're missing a specific mapping type or when you want to replace the existing implementation of a mapping type. In order to create a new mapping type you need to subclass ``Doctrine\DBAL\Types\Type`` and implement/override the methods as you wish. Here is an example skeleton of such a custom type class: .. code-block:: php getConnection(); $conn->getDatabasePlatform()->registerDoctrineTypeMapping('db_mytype', 'mytype'); When registering the custom types in the configuration you specify a unique name for the mapping type and map that to the corresponding fully qualified class name. Now the new type can be used when mapping columns: .. code-block:: php