Closed devotionsolutions closed 3 years ago
You always can use manual queries with this library.
Select * from categories right join categories_subcategoris on categories.id = categories_subcategories.categories_id left join sub_categories on categories_subcategories.subcategories_id = subcategories.id
You always can use manual queries with this library.
Select * from categories right join categories_subcategoris on categories.id = categories_subcategories.categories_id left join sub_categories on categories_subcategories.subcategories_id = subcategories.id
Great idea, but unfortunately "RIGHT and FULL OUTER JOINs are not currently supported" for sqlite
You could emulate RIGHT JOIN with LEFT JOIN by swapping the position table when selecting it.
Select * from categories_subcategoris left join categories on categories.id = categories_subcategories.categories_id left join sub_categories on categories_subcategories.subcategories_id = subcategories.id
Hope it help.
You could emulate RIGHT JOIN with LEFT JOIN by swapping the position table when selecting it.
Select * from categories_subcategoris left join categories on categories.id = categories_subcategories.categories_id left join sub_categories on categories_subcategories.subcategories_id = subcategories.id
Hope it help.
Thanks! it worked!
What's the proper way to deal with many to many relationships between tables using this library? Let's say we have three tables:
Like in this diagram
Any idea?