mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-11 20:00:30 +01:00
How to fetch objects in backgound? #145
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 @sidlatau on GitHub (Jun 7, 2017).
I am trying to fetch data in background, and use fetched data in main thread, but when I try to access managed objects properties app crashes. Problem for this I think is that background context is destroyed when transaction finishes. Is it possible to change managed objects context to main somehow (simmilar to
transaction.edit(object)functionality)?@JohnEstropia commented on GitHub (Jun 7, 2017):
Yes, you need to fetch it again from your datastack:
@sidlatau commented on GitHub (Jun 7, 2017):
That's exactly what I needed. Thanks for quick response.