Kitura / Swift-Kuery-ORM

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

fix: Prevent error when using camel case properties #93

Closed kilnerm closed 5 years ago

kilnerm commented 5 years ago

This PR resolves an error that occurs when using camel case properties in Model declarations.

The issue was introduced with the changes in SwiftKuery to respect casing when converting a Table property to a Column.

The fix simply removes the lower casing of decoding keys as the database now returns camel cased titles as opposed to the previously lower case titles.

The PR also adds a test to ensure that Models containing camel case properties can be successfully decoded.