I am trying to create a model (MySQLStringModel
) and set an id(of String ?
type) to it. There is no errors or any other message in console, and save(on: req)
works successfully , but model doesn't appear in Table of the database. Whats can be wrong?
func create(_ req: Request, person: Person) throws -> Future<Person> {
return Person(id: person.id, name: person.name).save(on: req)
}
P.s.: All works when I use MySQLModel with Int?
id, and I don't set this id directly (it sets automatic with autoincreament )