Ostico / PhpOrient

PhpOrient - Official Php driver based on the binary protocol of OrientDB.
Other
68 stars 37 forks source link

Why are qoutes added around the keys in serializeArray? #28

Closed fellars closed 9 years ago

fellars commented 9 years ago

This is adding extra quotes in all the keys within a map. It de-serializes fine, but makes doing queries a pain because the qoutes are saved to the db. So now if I want to query a few levels deep I need to do something like:

level1.level2["\"level3\""] (instead of just: level1.level2.level3 )

Is there a reason for putting all keys in quotes?

Code in question is from line 558 in CSV.php

Ostico commented 9 years ago

Hi @fellars , sorry for the late response,

can you send me an example code so i can test it and find the issue if it exists? I must check if the code can be improved without break anything.

fellars commented 9 years ago

It looks like my problem was at the database level. The property was set as an EmbeddedMap, but then I had the Linked_Type as EMBEDDED which seems to have been causing this issue. I modified it to not have any linked_type and now things are working as expected.