Include in findone return null if the join table not have its id
I have table "sometable" and "purchase_items" table. in purchase_items, i have sometable_id. im trying to include purchase_items in findOne purchase_items. it works when purchase_items have data with sometable_id, but it return null when
example: sometable has id = 9, but purchase_items has no sometable_id = 9.
i want to still get the data, with purchase_items: []. is it posible?
![No description](https://cdn.answeroverflow.com/1263072311003578439/image.png)
1 Reply
Hi @dev
can you try this query?