-
Notifications
You must be signed in to change notification settings - Fork 248
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
Amplify DataStore: many-to-many join table not syncing when using selective sync #5454
Comments
Hi @stephenjen, thank you for submitting this issue. We will take a look at this issue and get back to you when we have any updates or questions. |
An update - I'm able to sync ShareOperationMode items for the owner but not for the owner's friends, even through I am able to sync owner's friends' Share items, which has a sync expression of |
An update - It works properly when I clear() as opposed to stop() before restarting DataStore to reevaluate sync expressions. Please make this work for stop() too, as having to wait for a clear() is quite impractical outside of the initial sync when users first install and get the app going. Maybe there's a better way for me. My current use case: users can find and add friends in the app, and when they do, they can also see items owned by their friends. Currently I reevaluate sync expressions to enable this functionality, but is there a way to set up my schema so I can 1) accomplish the functionality I just described; and 2) do so without users having to carry around both their friends' and non-friends' items? |
Any updates? |
@stephenjen, do you get this problem for Android too or is this only an issue you're having with iOS? |
I'm only developing for iOS, so can only speak to it not working in iOS |
Hi @stephenjen, |
@khatruong2009 yes, that is a custom extension that essentially creates a series of .or() predicates. I'm not sure this is the issue as this custom extension works for the Share and other models. The issue seems to be when the sync expressions is reevaluated for Share, the automatically generated ShareOperationMode (the many to many join model) isn't updated. |
Here's the custom isOneOf extension:
|
Hi @stephenjen, thanks for providing that extra query. We still working to reproduce this behavior. We will let you know our findings. |
Hi @Equartey , thanks for the update. Please try my schema to see if the issue can be replicated on your end. Thanks.
|
thank you for providing these details. we will look into this issue and get back to you with any updates. |
Description
I'm experiencing an issue with Amplify DataStore in a Flutter application. The main models (Share and OperationMode) are syncing correctly, but the automatically generated join table for a many-to-many relationship (ShareOperationMode) is not syncing to the device.
Here is the schema:
Here is the syncExpressions:
Categories
Steps to Reproduce
Screenshots
No response
Platforms
Flutter Version
3.24.0
Amplify Flutter Version
2.4.1
Deployment Method
Amplify CLI (Gen 1)
Schema
No response
The text was updated successfully, but these errors were encountered: