Affects Version/s: None
Fix Version/s: None
Security Level: All
When using a mapping Type that declares convertToDatabaseValue, the method is not always called in queries.
(with entity.field being of custom type 'the_mapping_type')
Type::convertToDatabaseValue() is correctly called when using:
But it is not called when using:
which gives a query that returns invalid results.
Like other mapping types in this situation, there is no reason the type is not inferred automatically from the field.
I have written a failing test case in Doctrine\Tests\ORM\Functional\TypeValueSqlTest: