Beginner - Modeling a basic todo list application. #1627
-
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @mdechalendar-heetch! Here are my 2 cents on the questions: In TCA, you can imagine the exact same segmentation if you want to keep things isolated: A The Once you have Question 2: Having several Footnotes
|
Beta Was this translation helpful? Give feedback.
Hey @mdechalendar-heetch! Here are my 2 cents on the questions:
Question 1: Storing
Todo
s in a databaseThe
Todo
's index is a property of aTodo
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 wantNSPersistentCloudKitContainer
) is to create aTodoRow
(orTodoItem
) that holds both index and a reference to someTodo
content. The list thus contains a sequence ofTodoRow
, each in a "to-one" relation toTodo
. So I haveTodos <->> TodoRow <<-> Todo
. Here theTodo ->> TodoRow
isto-many
because aTodo
can belong to different collections, with different indexes.In TCA, you can imagine the exact same seg…