0 votes

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 ?

in Solved by
recategorized by

1 Answer

0 votes
Best answer


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-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"/>
by Skipper developer (141k points)
selected by