I want to be able to nest my includes in a query, but I wanted the results to be un-nested.
For example:
db.a.findAll({
where: {id: id},
include: [
{ model: db.b, include: [
{ model: db.c, include: [
{ model: db.e }
]}
]}
]
})
...
returns something like this:
[
a: {
...
b: {
...
c: {
...
d: {
...
}
}
}
}
]
but I want this:
[
a: {
...
b: {
...
}
c: {
...
}
d: {
...
}
}
]
Is this possible without refactoring the models/tables?
via gurs1kh
No comments:
Post a Comment