mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
In xcode 9.1 and swift 4.0 branch, compile error is Generic parameter 'D' could not be inferred #186
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dhamu-navadiya on GitHub (Nov 11, 2017).
let addedPlant:Plant? = CoreStore.fetchOne(From(), Where("plantid", isEqualTo: self.plant.plantid))
@JohnEstropia commented on GitHub (Nov 12, 2017):
The Swift 4 update is a major overhaul of the fetching mechanism. In particular, fetch clauses such as
Where,OrderBy, and several others are now generic typesWhere<T>,OrderBy<T>, etc.For your case you can opt to refactor your code to one of the following syntaxes:
This will be needed for all your app's fetching code. If you are not ready for a big refactor you can opt to stay with the
masterordevelopbranches (version4.2.xin Cocoapods), which are all on Swift 3.2 and are usable in Xcode 9.1 wether your app is in Xcode 3.2 or 4.0.The full documentation for the Swift 4 changes (CoreStore 5.0.0) is being rewritten, and I apologize that it's taking some time.
@JohnEstropia commented on GitHub (Dec 31, 2017):
Version 5 is now released with changesets: https://github.com/JohnEstropia/CoreStore/releases/tag/5.0.0