In a belongsToMany
relationship, when I transform the result into json
it returns the _joinData
field.
Would there be any way to not bring it into the query or display it in json
using any Cake option?
JSON
example:
{
"id": 1,
"name": "Produto Teste",
"slug": "produto-teste",
"cover": null,
"categories": [
{
"name": "Bebida",
"_joinData": {
"category_id": 1,
"id": 5,
"product_id": 1
}
},
{
"name": "Roupa",
"_joinData": {
"category_id": 2,
"id": 6,
"product_id": 1
}
}
]
},
Edit: I'm using version 3.2