-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse Relations not working after migration #658
Comments
Looking through the my mongoDB on AWS closer I do see that the _SCHEMA and _Join:unitImages:Units collections do connect everything nicely. So I am really confused. |
Can you provide the initialization code for ParseClient, are you setting the server URL correctly, are other requests working? You can set the environment variable VERBOSE=1 on your parse-server machine and check the logs to see if the request is even hitting the right place. |
app.js
checkFunctions.php (file function being called in)
Applicable query code in checkFunctions.php
Ive tried a number of different standard queries in checkFunctions.php and they seem to be working fine. Im very new to node so forgive me, but I'm not sure how to set VERBOSE=1. I assume its in the CL while in my /parse directory but am not sure on the command itself. Im working on following the code to understand better how the SDK gathers relational information from my mongo instance. Im still not sure how
I appreciate the fantastic support of this open source community. |
I was able to use a different query to get my expected results.
However it would still seem to me that the fact that my initial query works in hosted parse and not parse-server is still something of interest. I truly believe that the problem is in the migrated database specifically the collection "Units" not having the |
Getting this error when trying to save relations to a user after updating my app from 1.6.2 -> 1.12.0 in anticipation of migration. However after updating my iOS app "Tipped" which uses PFRelation a lot..... is super buggy, and weirdly the scroll performance on my collection views have dropped. Here is the error response when trying to save a relation: error response: Code:
|
@petek157 do you still face the issue or is that resolved for you? |
My work around is working. But the "documented" way of querying a relation didn't seem to work. I haven't tried it again recently. I guess as far as my issue is concerned it is resolved. But Id say that there may still be a bug in the the server/database/migration regarding relation queries. |
Yes, its still not working. I refactored our project to use pointer relationships instead of PFRelation. |
Once i migrated the relations are gone. So my existing sub queries are not working any more. please fix this. |
Hello Guys, I am also not able to see the relation column on mongodb after migration can you please tell me that how would that show??? |
I had the same problem. After the parse migration, the response from the server doesn't include the relation. However, I just found out that even if it doesn't, |
@ernestofndz, Can you pls let me know steps to get the relations ? |
@shrimant-nikate-mobisoft sure. For example, your object
Basically these are the steps, language is Swift but sure each SDK have similar methods. EditJust noticed that while preparing the query, you should also include the key of the relation(s), e.g |
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.
The text was updated successfully, but these errors were encountered: