Skip to content
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

transientIncludes in getConversations fails #29

Closed
rickmak opened this issue Jul 26, 2016 · 0 comments
Closed

transientIncludes in getConversations fails #29

rickmak opened this issue Jul 26, 2016 · 0 comments
Assignees

Comments

@rickmak
Copy link
Member

rickmak commented Jul 26, 2016

Current implementation put user_conversation in private DB, while conversation are at public db with ACL. getConversations trying to load conversation when querying user_conversation with transientInclude. But it is mistaken to assume skygear will able to do a cross database transientIncludes. Resulting the transient result is empty.

_Proposed solution_
Put the user_conversation back to public database and set it non public readable.

SQL for migration:

UPDATE "app_chat"."user_conversation" SET "_database_id"='', "_access"='[{"public": false}]'

And modify the user_conversation related code back to using publicDB.

@rickmak rickmak self-assigned this Jul 27, 2016
rickmak added a commit that referenced this issue Jul 27, 2016
For existing DB, please run the following SQL for old database migration
`UPDATE "app_chat"."user_conversation" SET "_database_id"='', "_access"='[]'`

refs #29
@royuen royuen closed this as completed Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants