perform a where in query in bookshelf.js

Viewed 10808

I want to perform a WHERE - IN query/operation but normal where gives error.

I want this

select * from `calendar_event_rsvp` where `event_id` in ('1', '2', '3')

But below code leads to

select * from `calendar_event_rsvp` where `event_id in` = '1', '2', '3'

Code

CalendarEventRSVP.forge()
                .where({
                    "event_id": event_ids
                })

How do i do this in bookshelf.js

2 Answers
Related