mirror of
https://github.com/JohnEstropia/CoreStore.git
synced 2026-01-14 07:33:28 +01:00
Ordered Batch Insert of CoreStoreObjects #181
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 @SlinToWin on GitHub (Oct 28, 2017).
Hello i have a problem,
i get an ordered list of objects from my api and want to save it via core store.
So i flatmap the api objects in an transaction and create the CoreStoreObject models.
The Problem is, that this action don't save the models in the correct order (observable via PK)
So after fetching the core store objects via fetchAll, i get a wrong order of my items.
For Instance:
Has anyone an idea how to work around this issue without introducing some kind of
indexproperty to my core store objects?@JohnEstropia commented on GitHub (Oct 29, 2017):
You will need to store the order somewhere.
One way to do this is to create an object with an ordered relationship, but even then you cannot observe on those objects like you could a
ListMonitor. If you need to observe that order you will need a sorting index.@SlinToWin commented on GitHub (Oct 30, 2017):
Ok, just inserted a sorting index :)