Closed PopeNobody closed 2 years ago
FILL_THIS_OUT
, otherwise your issue will be closed. If a field does not apply to the issue, fill in n/a
.Sorry I didn't have time to go through the bug report process a second time for the second patch.
It looks like my data was wrong. Sorry about that!
Things seem to have gone wrong when copying data from mongodb to postgres.
It looks like my data was wrong. Sorry about that!
Can we close this issue as false alarm?
I'm afraid so. I am in the process of moving a parse installation from parse to mongo, and it appears that I was not getting any results because I had not munged the data properly. It was in the as a tripple, like you see of you do a console.log() of a fresh parse object, but it was supposed to be just the object id in the column. When I fixed the data, the problem stopped happening.
Great, thanks for clarifying, I'll go ahead and close.
New Issue Checklist
Issue Description
The following query returns no results under postgres, though there are several objects that should be returned.
The class in question is "PublicCell". Each PublicCell has an owner, who is a user. However, the following query does not return any results, even though the user I am using owns four cells.
The class is created with the following code:
The "members" relation works fine. This query returns the cells of which the user in question is a member.
Steps to reproduce
Create the class above, create an instance which is owned by your user, and the query for instances of PublicCell which are owned by your user.
Actual Outcome
I got nothing back.
Expected Outcome
I expected to get my objects.
Environment
Server
Reproduced with the bleeding edge version from gitub
Ubuntu
AWS
Database
System (MongoDB or Postgres):
Postgres
Database version:
psql (PostgreSQL) 12.9 (Ubuntu 12.9-0ubuntu0.20.04.1)
Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
parse-server and postgres both live on the AWS box.
Client
Latest al
FILL_THIS_OUT
Logs
Ok, having answered the questions, I seem to have the fix. It works for me for the queries I am trying to do, though it might break other stuff.
The old code was comparing (something ... I don't really grok the :name syntax .. I assume it was the full pointer JSON object ) to fieldValue.objectId. But the field is not an objectId, it's a Pointer. So I changed it to use the postgres "extract field as text from json" operator, and that made my shit work.
I have not tested all of the system with the patch. But what I am doing now works, and that is all I have time for at the moment.
As a special bonus, I have second patch for you:
There seems to be a race condition in the startup code which caused my server to emit the following warning on startup:
Using setTimeout to delay the test by one second resolves the issue.
I hope these patches are useful to you, and I declaim all ownership of them. Use them any way you like, with no expectation of recompens.