Back

How to handle nested data containing more than 3 levels?

  • 0
  • Databases
  • Flutter
  • Realtime
Bichkar
10 Dec, 2023, 07:00

I am developing a Flutter application containing nested data (having more than 3 levels of nesting) e.g. StudentClass -> Student[] -> Person -> Contact -> Place i.e. StudentClass containing Student (list), Student containing Person, and so on. I am unable to handle such situations. Please suggest some tutorials for such applications containing nested data.

TL;DR
The user is asking for help on handling nested data with more than 3 levels. They want to fetch data for all students in a class, or for a single student with all related data. Some users suggest restructuring the database or using relationships to optimize requests. No solution is provided.
Drake
11 Dec, 2023, 00:48

It depends on how your app works. For example, if you end up opening a person, you fetch the person when you open that person route/page

Bichkar
13 Dec, 2023, 18:25

Thank you very much for your reply. I would like to fetch StudentClass data containing all related data of all the students, or the data of a single student in class containing all the related data. This will be possible if we have relationships for more than 3 levels.

kamal.panara
4 Jan, 2024, 11:24

you can achive this using relationships, I'm using 2 levels in my flutter app and I'm using relationships to get the data in single request. you can do the same for 3 levels.

ideclon
4 Jan, 2024, 12:11

Relationships are currently limited to three levels.

kamal.panara
4 Jan, 2024, 12:24

so it will work for him for 3 levels

ideclon
4 Jan, 2024, 12:24

No, he wants five levels

kamal.panara
4 Jan, 2024, 12:25

then he should restructure his database, to optimize his requests make it posibble with 3 levels.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more