Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

syntax for whereNotIn for mysql while building query in objection Js #158

Open
tusharSharma5512 opened this issue Sep 9, 2021 · 0 comments

Comments

@tusharSharma5512
Copy link

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'])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant