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

[DataStore] Observe and ObserveQuery do not include nested data for items synced over the network on Android #943

Closed
Jordan-Nelson opened this issue Oct 5, 2021 · 3 comments
Assignees
Labels
Android Issues specific to the Android Platform bug Something is not working; the issue has reproducible steps and has been reproduced datastore Issues related to the DataStore Category requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed.

Comments

@Jordan-Nelson
Copy link
Member

Jordan-Nelson commented Oct 5, 2021

Describe the bug
The item included in the subscription event from the observe() API does not include nested belongsTo data when the item is synced over the network on Android.

To Reproduce
Steps to reproduce the behavior:

  1. Create an app with a belongTo relationship with cloud sync (Blog/Post)
  2. Set up an observe subscription on the model with a belongsTo relationship (ex: Post)
  3. Run the app on Android and add some data (several Posts)
  4. Close the app and clear data (or uninstall)
  5. Launch the app again
  6. Notice that the create events from observe() do not include nested data
  7. Run the test again with iOS, and notice that the create events from observe() do include nested data

Expected behavior
Nested data for belongsTo relationships should be included in the item emitted from Observe()

Platform
Amplify Flutter current supports iOS and Android. This issue is reproducible in (check all that apply):
[x] Android
[] iOS

Additional context
This was already fixed for the Query() API in this PR. A similar change may be needed for Observe().

@Jordan-Nelson Jordan-Nelson added Android Issues specific to the Android Platform datastore Issues related to the DataStore Category labels Oct 5, 2021
@offlineprogrammer offlineprogrammer added the bug Something is not working; the issue has reproducible steps and has been reproduced label Oct 7, 2021
@Jordan-Nelson Jordan-Nelson self-assigned this Nov 9, 2021
@Jordan-Nelson Jordan-Nelson added the requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed. label Nov 10, 2021
@Jordan-Nelson
Copy link
Member Author

This needs to be fixed in Amplify-Android. See aws-amplify/amplify-android#1566

@Jordan-Nelson Jordan-Nelson changed the title [DataStore] Observe() does not include nested data for items synced over the network on Android [DataStore] Observe and ObserveQuery do not include nested data for items synced over the network on Android Nov 10, 2021
@Jordan-Nelson
Copy link
Member Author

The issue was resolved for native apps. It was unfortunately not resolved for flutter apps using amplify-android. See aws-amplify/amplify-android#1610

@Jordan-Nelson
Copy link
Member Author

This was resolved in Amplify Flutter v0.3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android Issues specific to the Android Platform bug Something is not working; the issue has reproducible steps and has been reproduced datastore Issues related to the DataStore Category requires-android-fix This issue is the result of an underlying Amplify Android issue that needs to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants