Kitura / Swift-Kuery-ORM

An ORM for Swift, built on Codable
Apache License 2.0
212 stars 30 forks source link

Support optional id fields #102

Closed kilnerm closed 5 years ago

kilnerm commented 5 years ago

This PR adds support for optional id fields withing models.

When a user creates an optional id field the ORM will create an auto-increment column in the database table.

If an instance is saved with a nil id then the database will auto-increment. If the instance specifies an id the database will use the specified id.