Hello,
I'm migrating to Phalcon 3 on PHP 7. I'm using the Incubator classes for the current mongodb driver (vs old mongo drive.)
With the old Collection class, I accessed sub collection as arrays:
SomeCollection: {
"prop": {
"subprop": 1,
"other_prop": 2
}
}
<?php
$c = SomeCollection::findFirst();
$val = $c->prop['subprop'];
With MongCollection it seems to give me a StdClass instead of an array. I get PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array
when trying to access the subcollection as an array.
How do I change this behavior back? I literally have thousands of places I use this.
Thanks