Complex or(), and with inner join not working
Hello guys,
I am trying to build a more or less complex queries, with or() and..and inside the or().
.select(
.eq("is_removed", params.is_removed)
.or(
The client is complaining that 'equipment_purchase.order_product' doesn't exist, but it does.
if I do something like
.eq("equipment_purchase.order_product.is_removed", false), it doesn't complain and works.
So I am unsure on what's the issue, and if my only (current) solution is to do a post-processing filtering ?
Thank you in advance.
I am trying to build a more or less complex queries, with or() and..and inside the or().
.select(
*,
equipment: equipment_id!inner(
*,
location: location_id!inner(*)
),
equipment_purchase: equipment_purchase_id!inner(
*,
order_product: order_product_id!inner(
*,
order: order_id!inner(*)
)
)
).eq("is_removed", params.is_removed)
.or(
equipment_purchase_id.is.null, and(equipment_purchase.neq.null, and(equipment_purchase.order_product.is_removed.eq.false, equipment_purchase.order_product.order.status.eq.completed)))The client is complaining that 'equipment_purchase.order_product' doesn't exist, but it does.
if I do something like
.eq("equipment_purchase.order_product.is_removed", false), it doesn't complain and works.
So I am unsure on what's the issue, and if my only (current) solution is to do a post-processing filtering ?
Thank you in advance.