Description
I migrated my data from parse to AWS EC2 and mongoDB (cancelled the migration as I just wanted the data for testing not to start using the new DB in production). My current code getting related objects using parse.com that is working fine is
$relation = $thisUnit->getRelation('unitImages'); $query = $relation->getQuery(); $unitImages = $query->find();
$thisUnit being a Unit object and 'unitImages' being of type Relation property (column) of that object.
There is more to this function, but I don't THINK its relative to the issue. The message I am getting from this function is:
Fatal error: Uncaught exception 'Parse\ParseException' with message 'Bad Request' in /var/www/html/vendor/parse/php-sdk/src/Parse/ParseClient.php:352 Stack trace: #0 /var/www/html/vendor/parse/php-sdk/src/Parse/ParseQuery.php(362): Parse\ParseClient::_request('GET', 'classes/?where=...', NULL, NULL, false) #1 /var/www/html/checkAvailabilityFunctions.php(153): Parse\ParseQuery->find() #2 /var/www/html/lodging.php(385): createUnitList(Array) #3 {main} thrown in /var/www/html/vendor/parse/php-sdk/src/Parse/ParseClient.php on line 352
This issue could be entirely predicated on me not having a firm understanding of how this data is supposed to be structured. When I do a find() on the mongo shell of all the Unit objects the Relation Field of unitImages in not there at all. I expected to see the field with some form of pointer to the Unit Images Class.
Am I just doing something wrong or is there supposed to be a field in the Units Class?
Thanks for the help.