-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model castOnHydrate and useDynamicUpdate can't be used simultaneously #12147
Comments
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. |
@pfz @Besedin86 git clone [email protected]:phalcon/cphalcon.git
cd cphalcon
git checkout 3.0.x
# Use latest Zephir here, from master branch
zephir fullclean
zephir build |
@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 |
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, norcastOnHydrate
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.
Bugs
PDO::ATTR_EMULATE_PREPARES=false
. Inserts and updates are not processed.castOnHydrate
anduseDynamicUpdate
can't be used(true) simultaneously.Model::findFirst() triggers this error :
Configuration
The text was updated successfully, but these errors were encountered: