DataStore observeQuery api throwing Exception while listening for data updates using relational Data models in android #2756
Labels
datastore
DataStore category/plugins
pending-community-response
Issue is pending response from the issue requestor
question
General question
Before opening, please confirm:
Language and Async Model
Kotlin - Coroutines
Amplify Categories
DataStore
Gradle script dependencies
Environment information
Please include any relevant guides or documentation you're referencing
https://docs.amplify.aws/android/build-a-backend/more-features/datastore/relational-models/
Describe the bug
I have relational DataModels and creating a subscriptions in the code using observeQuery API providing QueryPredicate to listen to the data updates.
I am experimenting with the DataModels (Post and Comments ) provided in the official documentations.
Exception thrown
DataStoreException{message=Error in querying the model., cause=DataStoreException{message=Invalid SQL statement: SELECT
Comment
.id
ASComment_id
,Comment
.content
ASComment_content
,Comment
.createdAt
ASComment_createdAt
,Comment
.updatedAt
ASComment_updatedAt
,Comment
.postID
ASComment_postID
,Post
.id
ASPost_id
,Post
.content
ASPost_content
,Post
.createdAt
ASPost_createdAt
,Post
.rating
ASPost_rating
,Post
.status
ASPost_status
,Post
.title
ASPost_title
,Post
.updatedAt
ASPost_updatedAt
FROMComment
INNER JOINPost
ONComment
.postID
=Post
.id
WHEREComment
.postID
= ? ORDER BY ;, cause=android.database.sqlite.SQLiteException: near ";": syntax error (code 1 SQLITE_ERROR): , while compiling: SELECTComment
.id
ASComment_id
,Comment
.content
ASComment_content
,Comment
.createdAt
ASComment_createdAt
,Comment
.updatedAt
ASComment_updatedAt
,Comment
.postID
ASComment_postID
,Post
.id
ASPost_id
,Post
.content
ASPost_content
,Post
.createdAt
ASPost_createdAt
,Post
.rating
ASPost_rating
,Post
.status
ASPost_status
,Post
.title
ASPost_title
,Post
.updatedAt
ASPost_updatedAt
FROMComment
INNER JOINPost
ONComment
.postID
=Post
.id
WHEREComment
.postID
= ? ORDER BY ;, recoverySuggestion=There is a possibility that there is a bug if this error persists. Please take a look atReproduction steps (if applicable)
No response
Code Snippet
Log output
amplifyconfiguration.json
No response
GraphQL Schema
Additional information and screenshots
No response
The text was updated successfully, but these errors were encountered: