We use Symfony to create some web services. We use Doctrine-ORM to store objects and Doctrine-DBAL to retrieve data because they are very lightweight and can reuse the ORM (entity manager) connection.
With Doctrine-DBAL, integer values โโare returned in PHP as strings, and we want integer values, especially because they are stored in Javascript. After this discussion, How to get numeric types from MySQL using PDO? we installed our own mysql driver sudo apt-get install php5-mysqlnd and configured our symfony (dbal) configuration with PDO :: ATTR_EMULATE_PREPARE = โโfalse:
doctrine: dbal: . . options: 20 : false
In this configuration, we get integers when the mysql fields are integers. So far so good.
But a new problem arises: when storing objects with Boolean values โโthrough Doctrine-ORM, the entity is not saved. In the logs, we see INSERT and COMMIT, but the record is not in the database (if we use a table without logical fields defined in essence, the record is saved).
In addition, we do not receive any errors or exceptions, so we believe that this is very dangerous. We believe that there is a mistake in the PDO library, but we need to work on it a bit.
Question: Has anyone experienced this behavior? any workaround? Should this account be accounted for?
source share