arangodb / arangodb-php

PHP ODM for ArangoDB
https://www.arangodb.com
Apache License 2.0
183 stars 44 forks source link

"_flat" => true - Make it obvious! #222

Closed cherbert closed 7 years ago

cherbert commented 7 years ago

Wow, I have been tearing my hair out trying to get an AQL in PHP to render properly as a useful array I can actually do something with.

3 days of hunting the internet for the "_flat" = true solution. I was frustrated beyond belief just trying to get your driver installed since your README is wrong stating composer require arango instead of what it should be, composer require arangodb.

The "_flat" => true setting really should be more prevalent or even better the default configuration. As someone coming from MongoDB the examples here are really bare bones. Instead of every example ending with a var_dump actually show us how to extract the information. As it stands without "_flat" = true the cursor returned is difficult to work with and I almost gave up.

jsteemann commented 7 years ago

I have pushed a change to README.md (https://github.com/arangodb/arangodb-php/commit/7ca3c9a2c3bf027d4dd245ca299af9005c25e720) that hopefully better explains the problem and the solution.

Are you ok with that change?

cherbert commented 7 years ago

That's great. Thank you.

jsteemann commented 7 years ago

Thanks for reporting the issue and improving the docs for future users!