RxSwiftCommunity / RxGRDB

Reactive extensions for SQLite
MIT License
218 stars 35 forks source link

Difference fields in database and data model #48

Closed Mahdimm closed 6 years ago

Mahdimm commented 6 years ago

Hi @tonyarnold

I have a table with 3 columns but its model has 4 properties, What should I do in this case? because when I set insert query I got this error:

Fatal error: 'try!' expression unexpectedly raised an error: SQLite error 1 with statement INSERT INTO "student" ("id", "name", "lastName", "age") VALUES (?,?,?,?): table student has no column named age!

My table columns are: id, name, lastName My model properties: id, name, lastName, age

is there any protocol that I can fix this problem?

groue commented 6 years ago

Duplicate of https://github.com/groue/GRDB.swift/issues/438