New:
- Storable base to allow easier protocol extensions
- IdKey conveniences
Changed:
- Fluent now enforces reference types, use
final classin place ofstructon existing conformers. - Swift 3.1
Warning:
- id and exists are now implemented natively by Fluent, this means a few changes are required. All instances of
var id: Node?andvar existson models MUST be deleted for Fluent to function properly. - if you are setting
idmanually in initializers, it MUST happen AFTER the initialization to function properly. In practice, this means usually putid = ...at the BOTTOM of your initializer if you need to do it.
let name: String
init(node: Node, in context: Context) throws {
id = try node.extract("id") // will fail
name = try node.extract("name")
}=>
let name: String
init(node: Node, in context: Context) throws {
name = try node.extract("name")
// called after initialization proper
id = try node.extract("id")
}