github vapor/fluent 2.0.0-alpha.4
Fluent 2.0 Alpha 4

latest releases: 4.13.0, 4.12.0, 4.11.0...
pre-release9 years ago

New:

  • Storable base to allow easier protocol extensions
  • IdKey conveniences

Changed:

  • Fluent now enforces reference types, use final class in place of struct on 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? and var exists on models MUST be deleted for Fluent to function properly.
  • if you are setting id manually in initializers, it MUST happen AFTER the initialization to function properly. In practice, this means usually put id = ... 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")
}

#181

Don't miss a new fluent release

NewReleases is sending notifications on new releases.