[Solved] No blob type available when making a doctrine 2 + symfony model

0 votes
asked Apr 4, 2013 in Solved by anonymous
recategorized Apr 4, 2013 by ludek.vodicka

Doctrine supports the blob type see http://docs.doctrine-project.org/en/latest/reference/basic-mapping.html#doctrine-mapping-types but I am not able select this when defining an entity. Can this field type be added ?

1 Answer

0 votes
answered Apr 4, 2013 by ludek.vodicka Skipper developer (140,450 points)
selected Jul 30, 2014 by Martin Freki Stradej
 
Best answer

Hi,

welcome to our forum and for letting us know about this issue. It seems that Doctrine2 extend supported datatypes in lastest version. We will include support for all of these datatypes to next version.

In the meanwhile you can edit doctrine2.ormd2.cfg.xml and paste following lines to < data-types >.

<data-types>
  <data-type name="string"       unified-name="@VARCHAR,@CHAR,@LONGVARCHAR"/>
  <data-type name="integer"      unified-name="@INTEGER,@INT" primary-key-data-type="true"/>    
  <data-type name="smallint"     unified-name="@SMALLINT,@TINYINT"/>
  <data-type name="bigint"       unified-name="@BIGINT"/>
  <data-type name="boolean"      unified-name="@BOOL"/>
  <data-type name="decimal"      unified-name="@DECIMAL,@FLOAT,@DOUBLE,@REAL"/>
  <data-type name="date"         unified-name="@DATE"/>
  <data-type name="time"         unified-name="@TIME"/>
  <data-type name="datetime"     unified-name="@DATETIME,@TIMESTAMP"/>
  <data-type name="datetimez"    unified-name="@DATETIMEZ"/>
  <data-type name="text"         unified-name="@TEXT"/>
  <data-type name="object"       unified-name="@OBJECT"/>
  <data-type name="array"        unified-name="@ARRAY"/>
  <data-type name="simple_array" unified-name="@SIMPLEARRAY"/>
  <data-type name="json_array"   unified-name="@JSONARRAY"/>
  <data-type name="float"        unified-name="@FLOAT"/>
  <data-type name="guid"         unified-name="@GUID"/>
  <data-type name="blob"         unified-name="@BLOB"/>
</data-types>
...