Hi! I encountered this Could not initialize Card, skipping: unableToConvert(nil, “String”) issue and after many experiments, I think I found a solution (or at least a workaround).
For some context, I’m building a Card game and using PostgreSQL. The Card model had the following property:
var cardType: String
In the init(node: Node, in context: Context) method, there I see this error if the extract keys are not lowercase.
cardType = try node.extract(“cardtype”)
A lot of research to get to this point, but hopefully is solves your problem. While I prefer camel case, the database drivers providers don’t quite play nice here so I have opted for card_type and similar property naming even if it isn’t very swifty.