Skip to content
Discussion options

You must be logged in to vote

Hey @mdechalendar-heetch! Here are my 2 cents on the questions:
Question 1: Storing Todos in a database
The Todo's index is a property of a Todo in a "table/list" context. The way I'm making this kind of things works in CoreData for example (where we don't have ordered relations if we want NSPersistentCloudKitContainer) is to create a TodoRow (or TodoItem) that holds both index and a reference to some Todo content. The list thus contains a sequence of TodoRow, each in a "to-one" relation to Todo. So I have Todos <->> TodoRow <<-> Todo. Here the Todo ->> TodoRow is to-many because a Todo can belong to different collections, with different indexes.

In TCA, you can imagine the exact same seg…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant