Closed cybexai closed 2 years ago
Thank you for opening the issue. We've opened a PR with the fix: https://github.com/aws-amplify/amplify-js/pull/9166
thanks
Closing, as this is fixed as of @aws-amplify/datastore-storage-adapter@1.1.11
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs.
Looking for a help forum? We recommend joining the Amplify Community Discord server *-help
channels or Discussions for those types of questions.
Before opening, please confirm:
JavaScript Framework
React Native
Amplify APIs
DataStore
Amplify Categories
api
Environment information
Describe the bug
We're receiving NOT NULL constraint when retrieving data from datastore. These NOT NULL constraints affects entities with "connections".
Expected behavior
We want the data of all entities to be retrieved from datastore
Reproduction steps
type Enterprise @model @auth( rules: [ { allow: owner ownerField: "belongTo" } ] ) { id: ID! name: String! image: String contact: String Departments: [Department!] @connection(keyName: "byEnterprise", fields: ["id"]) belongTo: String! }
...
type Department @model @key(name: "byEnterprise", fields: ["enterpriseID"]) @auth( rules: [ { allow: owner ownerField: "belongTo" } ] ) { id: ID! name: String! options: AWSJSON }
...
await DataStore.query( Enterprise, (enterprise) => enterprise.isDeleted("eq", false), { sort: (s) => s.name(SortDirection.DESCENDING), } )
Code Snippet
Log output
aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
iPhone 6, iPhone Xr, LG G6, Xiaomi Redmi
Mobile Operating System
iOS 14.5, iOS 12.5, Android 9,10
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response