I am using combination of Lumen + Dingo Api + Ember JS. I have 3 entities Page - Row - Column
I have also added proper relationships in Lumen models like below
One Page -> Many Rows and inverse of in Row Model One Row -> Many Columns and inverse of in Row Model
The response from Lumen and Dingo API is like below
{
"data": {
"type": "pages",
"id": "2",
"attributes": {
"title": "Off Canvas"
},
"relationships": {
"rows": {
"data": [
{
"type": "rows",
"id": "1"
}
]
}
}
},
"included": [
{
"type": "columns",
"id": "1",
"attributes": {
"grid-size": 12
}
},
{
"type": "rows",
"id": "1",
"attributes": {
"size": 1
},
"relationships": {
"columns": {
"data": [
{
"type": "columns",
"id": "1"
}
]
}
}
}
]
}
Ember Part I have also done Model part in ember properly, and it is working properly. Like I can access page.rows and for reach row, row.column.
But it is Ember Inspector which is not displaying it correctly.
Is there anything wrong with Response or it is issue in Ember Inspector or anything else?
Aucun commentaire:
Enregistrer un commentaire