Closed jaymeen-unadkat-differenz closed 1 month ago
Hi @jaymeen-unadkat-differenz, can you provide us with the schema that you used, redacted if needed. Alternatively, you can run
amplify diagnose --send-report
to create a zip of the amplify project which includes the schema. (https://docs.amplify.aws/swift/tools/cli/reference/diagnose/)
Can you also provide us with the code snippet that you are using to perform the save?
Usually createAt
and updatedAt
are system-level fields on the model, so if you had overridden them in the schema and marked them as required, that may be related to the error you're seeing. We won't know until we have your schema to analyze and reproduce the problem.
@lawmicha This is the schema which we are using
type Imbybe @model @auth(rules: [{allow: public}]){
pk: String! @primaryKey(sortKeyFields: ["sk"])
sk: String!
gsi1: String @index(sortKeyFields: ["gsisk1"])
gsisk1: String
name: String
description: String
imageURL: String
ordersEmail: String
type: String
street: String
city: String
state: String
zipCode: Int
productCost: Int
productCategory: String
numberOfDrinks: Int
publishDate: AWSDateTime
expirationDate: AWSDateTime
eligibleZipCodes: [Int]
numberOfCampaigns: Int
numberOfOffers: Int
remainingNumberOfCampaigns: Int
productQuantity: Int
primaryProduct: Boolean
startingNumberOfDrinks: Int
remainingNumberOfDrinks: Int
lat: Float
lng: Float
operatingHours: AWSJSON
cognitoID: String
startingNumberOfOffers: Int
remainingNumberOfOffers: Int
campaignStatus: String
rating: Int
comment: String
}
Thanks for the schema, any code snippets and logs leading up to that error?
@jaymeen-unadkat-differenz If this is still an issue that you are facing, would you be able to provide more details requested in the previous comment?
Closing due to inactivity.
This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
I'm facing this issue when I hit the save command.
Steps To Reproduce
Expected behavior
Should work properly.
Amplify Framework Version
2.25.6
Amplify Categories
API
Dependency manager
Swift PM
Swift version
5.9
CLI version
12.10.1
Xcode version
XCode 15
Relevant log output
Is this a regression?
Yes
Regression additional context
No response
Platforms
iOS
OS Version
14.0
Device
Simulator iPhone 11
Specific to simulators
No - Not working anywhere
Additional context
No response