// NOTE: I've read a portion of the docs and it says something like //using a reduce function. I'm looking for a solution that is more // of an abstraction that works out of the box - just like how
// things are when you use a relational query (i.e., findMany)
[
{
person: {
id: "P1",
name: "Jane Doe"
...
}
hobby: { id: "H1", ... }
},
{
person: {
id: "P1",
name: "Jane Doe"
...
}
hobby: { id: "H2", ... }
},
{
person: {
id: "P3",
name: "Bob Smith"
...
}
hobby: { id: "H5", ... }
}
]
// NOTE: I've read a portion of the docs and it says something like //using a reduce function. I'm looking for a solution that is more // of an abstraction that works out of the box - just like how
// things are when you use a relational query (i.e., findMany)
[
{
person: {
id: "P1",
name: "Jane Doe"
...
}
hobby: { id: "H1", ... }
},
{
person: {
id: "P1",
name: "Jane Doe"
...
}
hobby: { id: "H2", ... }
},
{
person: {
id: "P3",
name: "Bob Smith"
...
}
hobby: { id: "H5", ... }
}
]