I am trying to define a column in Doctrine 2.1 (using annotations) that maps to a fixed-length CHAR column in MySQL. Using fixed = true does not do the job. Annotations
* @ORM\Column(type="string", length=49, fixed=true, nullable=false)
this results in the error: "The @ORM \ Column annotations declared in the [name here] property do not have a property with the name" fixed ". Available properties: name, type, length, precision, scale, unique, options, columnDefinition." Therefore, I assume that the "fixed" bit should be transmitted in the "options". But how? I have looked at the Doctrine 2.1 documentation and cannot find anything.
I tried
* @ORM\Column(type="string", length=49, options="fixed=true", nullable=false)
which does not lead to an error, but is ignored - the created column is VARCHAR (49).
I would prefer not to use columnDefinition.
Any suggestions?
thanks
source share