I want to merge the columns on the foreign table to the row that I am fetching. The Relationship is One-to-One. I want to have a getMany() return data that looks like this:
[
{
"MenuID": "1",
"MenuName": "testmenu",
"PageName": "testpage"
}
]
Not this:
[
{
"MenuID": "1",
"MenuName": "testmenu",
"Page": {
"PageName": "testpage"
}
}
]
I found out that I could use .getRawMany() and use .select(["Page.PageName as PageName"]) to get what I needed