You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument type '[Cart.CodingKeys]' does not conform to expected type 'CodingKey'
Incorrect argument label in call (have '_:is:ofType:associatedFields:', expected '_:is:ofType:associatedWith:')
I can silence these errors by using the correct function label associatedWith and by removing the square brackets:
.hasOne(customer.activeCart, is: .optional, ofType: Cart.self, associatedWith: Cart.customerId)
The text was updated successfully, but these errors were encountered:
Environment information
Codegen packages
Description
hasOne relations generate incorrect Swift code.
If I define a hasOne model like this:
Then the Swift generated code has a line like
This throws the following errors:
I can silence these errors by using the correct function label
associatedWith
and by removing the square brackets:The text was updated successfully, but these errors were encountered: