Originally created by @shift00 on GitHub (Jul 11, 2018).
Hello, I have very annoying problem with CoreStore. I start the application and sometimes I get an error which can be seen below. What can I do with this?
❗ [CoreStore: Fatal Error] BaseDataTransaction.swift:83 create
↪︎ Attempted to create an entity of type 'SampleCSModel', but a destination persistent store containing the entity type could not be found.
Originally created by @shift00 on GitHub (Jul 11, 2018).
Hello, I have very annoying problem with CoreStore. I start the application and sometimes I get an error which can be seen below. What can I do with this?
❗ [CoreStore: Fatal Error] BaseDataTransaction.swift:83 create
↪︎ Attempted to create an entity of type 'SampleCSModel', but a destination persistent store containing the entity type could not be found.
It is highly likely you are accessing your entities before the addStorage() method's completion is called. Please make sure your view controllers are not accessing your data before that.
You can easily check this by adding a breakpoint inside the completion closure and inside the CoreStore.defaultStack getter, then make sure that the defaultStack is called only from the CoreStore.addStorage() call.
@JohnEstropia commented on GitHub (Jul 17, 2018):
It is highly likely you are accessing your entities before the `addStorage()` method's `completion` is called. Please make sure your view controllers are not accessing your data before that.
You can easily check this by adding a breakpoint inside the `completion` closure and inside the `CoreStore.defaultStack` getter, then make sure that the `defaultStack` is called only from the `CoreStore.addStorage()` call.
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 @shift00 on GitHub (Jul 11, 2018).
Hello, I have very annoying problem with CoreStore. I start the application and sometimes I get an error which can be seen below. What can I do with this?
❗ [CoreStore: Fatal Error] BaseDataTransaction.swift:83 create
↪︎ Attempted to create an entity of type 'SampleCSModel', but a destination persistent store containing the entity type could not be found.
@shift00 commented on GitHub (Jul 11, 2018):
Hint: My code with
addStorage...is executed in AppDelegate indidFinishLaunchingWithOptions@JohnEstropia commented on GitHub (Jul 17, 2018):
It is highly likely you are accessing your entities before the
addStorage()method'scompletionis called. Please make sure your view controllers are not accessing your data before that.You can easily check this by adding a breakpoint inside the
completionclosure and inside theCoreStore.defaultStackgetter, then make sure that thedefaultStackis called only from theCoreStore.addStorage()call.