Open HuiSF opened 2 years ago
This bug is affecting us and it is currently a major blocker. Is there an eta on when this will be resolved?
I am getting the same issue when utilizing @hasOne
with @belongsTo
and trying to query through the @belongsTo
relationship.
I am only facing this issue in the iOS version of a flutter app, the android version is working as expected.
Is this possibly related to #965 it seems like there was a regression?
We are currently experiencing this bug as well and it's a major blocker for using Amplify.
It's been quite for a long here, I have the same error with the same schema models configuration but bit simple in terms of absence of the relation 1-to-many, just the field that stores and id of another model
Although this works on Android, i'm not sure other platforms allow the same. iOS currently has not implemented or tested this use case:
Amplify.DataStore.query(
Comment.self,
where: Post.keys.status.eq(PostStatus.active)
)
There are some designs around nested predicates which will allow this use case to work, ie. comments.post.status.eq(PostStatus.active)
, thus this is more of a feature request
This has been identified as a feature request. If this feature is important to you, we strongly encourage you to give a 👍 reaction on the request. This helps us prioritize new features most important to you. Thank you!
Describe the bug
Taking schema:
Execute to create post, comment and associate them.
All good, then run query against the
Comment
model. Notice that the predicate isPost.keys.status.eq(PostStatus.active)
.Below error was thrown
Where the predicate on the inner join seems wrong
should be as below?
NOTE: The same query predicate works in amplify-android without issues. Attaching amplify-android generated SQL command for the same query:
Steps To Reproduce
Expected behavior
The query should works as the same as how it works in amplify-android.
Amplify Framework Version
1.18.1
Amplify Categories
DataStore
Dependency manager
Swift PM
Swift version
5
CLI version
7.6.5
Xcode version
13.2.1
Relevant log output
Is this a regression?
No
Regression additional context
No response
Device
iPhone 13 simulators
iOS Version
15.2
Specific to simulators
No response
Additional context
No response