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?
1 Reply
Hi @dev
can you try this query?