Answer the question
In order to leave comments, you need to log in
How to store in the database a nested list of objects that do not have an id field?
Good afternoon, help with the solution of the problem, it is not possible to save a nested list of objects:
{
"total": 1,
"School": [
{
"id": "12",
"nmb": "59",
"name": "Имени Ивана Неизвестного"
"Classes": [
{
"name": "Математика",
"value": 12,
},
{
"name": "Физика",
"value": 21"
},
{
"name": "Химия",
"value": 22"
}
}
Answer the question
In order to leave comments, you need to log in
Well... Looks like for classes the natural key would be (id, name).
Where id are strings in School.
name is the name field in Classes
:-)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question