Closed
Description
I have an entity with the following column definition:
/**
* @ORM\Column(name="amount", type="string")
*/
private string $amount;
Now I want to type that property as numeric-string
because it will only ever contain numbers anyway.
/**
* @var numeric-string
*
* @ORM\Column(name="amount", type="string")
*/
private string $amount;
But I'm getting this error:
Property MyEntity::$amount type mapping mismatch: database can contain string but property expects string.
I don't know how to solve this. Is it even possible?
And is the error message correct? Shouldn't it say:
Property MyEntity::$amount type mapping mismatch: database can contain string but property expects numeric-string.
Metadata
Metadata
Assignees
Labels
No labels