My purpose is to get a configuration for a coherent type cast/bind in the ORM, while being able to use snapshots in models (and dynamic update). For instance, I have less (none) rounding problems when mysql driver delivers a float instead of a string php has to parse very carefully.
But neither PDO::ATTR_EMULATE_PREPARES to false, nor castOnHydrate work is this configuration (models using BIT column).
3rd bug is therefore the most annoying to me. 2nd was supposed to be temporary workaround, that doesn't work either... I assume ATTR_EMULATE_PREPARES is better than castOnHydrate, though i may be wrong about it.
I wrote a script to test easily all those points : phalcon_orm_datatype_bug.php
Hope it will help...
This script provides a test for #11205 as well.
PHP Fatal error: Uncaught Phalcon\Mvc\Model\Exception:
Column 'id' doesn't make part of the column map
Tried with 3.0.1 , no success. Is there any best practice around there ? I'm using === in my JS apis and would like the json results to be properly typed/casted. It's a nightmare since it's broken (>2.0).
I have the same problem.
Could you please check 3.0.x branch?
git clone firstname.lastname@example.org:phalcon/cphalcon.git
git checkout 3.0.x
# Use latest Zephir here, from master branch
@sergeyklay all is fine.
@sergeyklay issue solved for castOnHydrate with same phalcon/zephir build as Basedin86.
Though PDO::ATTR_EMULATE_PREPARES to false with BIT column still fails. May be I should open an other thread to be consistent on that matter ?
@pfz Yes, open please new issue