v5.1.0
This release adds convenience APIs for fetching and creating Fetchable and Creatable Models using Swift KeyPaths and Operators.
E.g.:
final class MyModel: NSManagedObject, FindOrCreatable {
let hasContent: Bool
let validTo: Date?
}
let context = CoreDataStack.mainContext
let models = try MyModel.find(in: context, where: \.hasContent == true && \.validTo >= Date(), sortedBy: ^\.validTo)
let newModel = try MyModel.findOrCreate(in: context, where: \.hasContent != true)