Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Storing nested objects in mongodb



I am trying nested object something like,

 { 'id' : '1234', 'loc' : { 'lat' : 1234, 'long' : 1234 } }


  $loc = ['long' => $obj->longitude,'lat' => $obj->latitude];
  $obj->loc = $loc;

but, I have got the below exception, [Sun Jun 05 19:37:02 2016] [error] [client] exception 'MongoWriteConcernException' with message 'localhost:27017: location object expected, location array not in correct format'.

Please let me know how to do nested objects in mongodb + phalcon save/update.

Raja K

edited Jun '16

Seems not working. It says invalid method "assign" , also tried created a separate object.but not working.

Gonna delete my answer then, hopefully it'll re-mark the thread as open

Nope, it's stilled marked as solved... =/


I did not understand.

You've marked my reply as a proper answer, so the forum no longer shows your post as unsolved.

I doubt more people will answer, because they see it as solved.

You should either re-ask the question in a new thread, or mark this thread as unsolved somehow