feathers-objection icon indicating copy to clipboard operation
feathers-objection copied to clipboard

syntax for whereNotIn for mysql while building query in objection Js

Open tusharSharma5512 opened this issue 4 years ago • 0 comments

i want to find rows from table 1 which does not exist in table 2. depending on two columns. I'm trying to build a query in objection js but not getting the required answer. and the entries are same but column names are different. Here is my query :- let miniShift = await createModel.query() .select('txnShiftUniqueId', 'shiftName', 'laneName', 'txnDate', 'txnShiftDetail.uidCby') .leftJoin('mstShift', 'mstShift.shiftId', 'txnShiftDetail.shiftId') .leftJoin('pmtrLane', 'pmtrLane.isEnabled', 'txnShiftDetail.isEnabled') .whereNotIn('txnShiftDetail.shiftId', ['txnCashup']) .whereNotIn('txnShiftDetail.laneId', ['txnCashup']) .whereNotIn('txnShiftDetail.uidCby', ['txnCashup'])

tusharSharma5512 avatar Sep 09 '21 10:09 tusharSharma5512