[DDC-24] text type not portable (works only on MySQL) Created: 30/Sep/09  Updated: 14/Jun/10  Resolved: 01/Oct/09

Status: Closed
Project: Doctrine 2 - ORM
Component/s: ORM
Affects Version/s: 2.0-ALPHA2
Fix Version/s: 2.0-ALPHA2
Security Level: All

Type: Bug Priority: Blocker
Reporter: Ismo Toijala Assignee: Roman S. Borschel
Resolution: Fixed Votes: 0
Labels: None


 Description   

The text type is not portable to other RDBMS than MySQL. To support the text type, a platform must implement the method getClobDeclarationSql(array $field). Currently only MySqlPlatform has this method. This means that attempting to use the CLI tool to create a schema with a text column using another RDBMS fails with the following error:

Fatal error: Call to undefined method Doctrine\DBAL\Platforms\SqlitePlatform::getClobDeclarationSql() in D:\Projects\Test\tools\sandbox\lib\Doctrine\DBAL\Types\TextType.php on line 15

I believe at least Sqlite supports the CLOB type.

Either the text type should be supported by all platforms or the documentation should be revised. Currently it says:

"All Doctrine Mapping Types that ship with Doctrine are fully portable between different RDBMS."

This makes easy testing of models using sqlite with minimum configuration impossible with the text type.



 Comments   
Comment by Roman S. Borschel [ 30/Sep/09 ]

Thanks. We will try to address this as soon as possible. This is just an oversight in the implementation. The text type can definitely be made portable across all platforms.

Generated at Sat Nov 01 12:41:12 UTC 2014 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.