Originally created by @dhamu-navadiya on GitHub (Nov 11, 2017).
let addedPlant:Plant? = CoreStore.fetchOne(From(), Where("plantid", isEqualTo: self.plant.plantid))
Originally created by @dhamu-navadiya on GitHub (Nov 11, 2017).
let addedPlant:Plant? = CoreStore.fetchOne(From<Plant>(), Where("plantid", isEqualTo: self.plant.plantid))
<img width="288" alt="screen shot 2017-11-11 at 10 43 10 pm" src="https://user-images.githubusercontent.com/30049650/32691706-c062657c-c731-11e7-8bae-971205f64ab7.png">
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 types Where<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 master or develop branches (version 4.2.x in 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 (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 types `Where<T>`, `OrderBy<T>`, etc.
For your case you can opt to refactor your code to one of the following syntaxes:
```swift
let addedPlant = CoreStore.fetchOne(
From<Plant>(),
Where<Plant>("plantid", isEqualTo: self.plant.plantid)
)
```
```swift
let addedPlant = CoreStore.fetchOne(
From<Plant>()
.where(\.plantid == self.plant.plantid)
)
```
```swift
let addedPlant = CoreStore.fetchOne(
From<Plant>()
.where({ $0.plantid == self.plant.plantid })
)
```
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 `master` or `develop` branches (version `4.2.x` in 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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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