Originally created by @Pratik-Sodha on GitHub (Apr 12, 2019).
I am using Version 6.3.1. With swift 5 and xcode 10.2.
Using below code to fetch all records.
extension Post {
static var allPosts: [Post] {
var posts : [Post] = []
do {
posts = try CoreStore.fetchAll(From<Post>().tweak({ $0.includesPendingChanges = false }))
} catch {
print(error)
}
return posts
}
}
Getting below error message.
⚠️ [CoreStore: Error] From.swift:155 applyToFetchRequest(_:context:applyAffectedStores:)
↪︎ Attempted to perform a fetch but could not find any persistent store for the entity
(CoreStore.CoreStoreError) .persistentStoreNotFound (
.errorDomain = "com.corestore.error";
.errorCode = 8;
.entity = Post;
)
Originally created by @Pratik-Sodha on GitHub (Apr 12, 2019).
I am using Version 6.3.1. With swift 5 and xcode 10.2.
Using below code to fetch all records.
```
extension Post {
static var allPosts: [Post] {
var posts : [Post] = []
do {
posts = try CoreStore.fetchAll(From<Post>().tweak({ $0.includesPendingChanges = false }))
} catch {
print(error)
}
return posts
}
}
```
Getting below error message.
> ⚠️ [CoreStore: Error] From.swift:155 applyToFetchRequest(_:context:applyAffectedStores:)
> ↪︎ Attempted to perform a fetch but could not find any persistent store for the entity <Post>
> (CoreStore.CoreStoreError) .persistentStoreNotFound (
> .errorDomain = "com.corestore.error";
> .errorCode = 8;
> .entity = Post;
> )
Solve using retrieve data into main.async{ } queue.
DispatchQueue.main.async { let posts = Post.allPosts }
@Pratik-Sodha commented on GitHub (Apr 12, 2019):
Solve using retrieve data into main.async{ } queue.
` DispatchQueue.main.async {
let posts = Post.allPosts
}`
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 @Pratik-Sodha on GitHub (Apr 12, 2019).
I am using Version 6.3.1. With swift 5 and xcode 10.2.
Using below code to fetch all records.
Getting below error message.
@Pratik-Sodha commented on GitHub (Apr 12, 2019):
Solve using retrieve data into main.async{ } queue.
DispatchQueue.main.async { let posts = Post.allPosts }