Closed andreyvk closed 9 years ago
Hi @andreyvk ,
you're right, by design in PhpOrient the numbers are always treated as strings because of the platform dependant nature of PHP.
In 32bit platform the integers must be treated as string because the numbers greater than 2147483647 would be lost and the BCMath/GMP modules must be used to obtain the right numbers.
I taken a decision, to make the results of the same type for all platforms ( 32 and 64bit ) and leave to the user/developer the decision on how to use it's own data ( by manual cast ) i used string for all primitive data types.
Hi @Ostico, thanks for clearing this out. Maybe it's good to add this note to the documentation somewhere after the https://github.com/Ostico/PhpOrient#phporient-works-even-on-32bit-and-64bit-platforms section. What do you think?
Yes, i will do today or tomorrow i think in the next release
:+1:
Hi,
Looks like there's an issue with loading fields of type double (havent tested floats yet). Im on the latest PhpOrient using OrientDB 2.0.12.
Here's the schema + test record:
Getting data and printing out
attr2
shows that it's a string:Prints the following to the console: