You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So an instance of an Item has a BuiltList<Item> attribute what might ultimately create a deep hierarchy.
There's no simple way to update the Item with "Titel 2":
items.rebuild((b) => b.items[0].items[0].title = "new title")
//does not work as we're getting builders when accessing an item via array index
//... and we don't know the correct indexes
Is this even the right approach?
Is it better to create a flat hierarchy with lots indexes pointing to each other?
Thank you!
The text was updated successfully, but these errors were encountered:
It works if you know how many items you'll have. For example if you always had three items, you could have fields called first, second and third. Then you could do
--but with arbitrary length lists this doesn't make sense.
Maybe it would be handy to expand on the use case a bit. For any particular generic structure I guess you can write a generic accessor for it, something like
This is probably more of a question than an issue - I hope this is the right place for it.
This is an example model:
So an instance of an
Item
has aBuiltList<Item>
attribute what might ultimately create a deep hierarchy.There's no simple way to update the
Item
with "Titel 2":Is this even the right approach?
Is it better to create a flat hierarchy with lots indexes pointing to each other?
Thank you!
The text was updated successfully, but these errors were encountered: