Answer the question
In order to leave comments, you need to log in
What is the best way to organize the structure of data storage in an application?
I decided to create a menu builder, there are different types of menu objects (eg link to category, link to brand, custom link). You can choose a display style for each type, but there are several templates. Depending on them, the diz changes. menu, as well as a list of display options for each object, and a different set of fields in the array of menu objects can be used.
When the template changes, the array with fields can change:
{
id = id,
type = type,
name = name,
style = style,
доп. поля...
items = [...]
}
Answer the question
In order to leave comments, you need to log in
If your model looks like this when binded,
you are doing something wrong.
Better like this:
In general, google it at a time:
habrahabr.ru/post/181882
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question