I’d like to know how to effectively run a query such as:
select game from Game game
inner join game.Categories cat
where cat.Name in ('A', 'B')
This gives me games with categories A or B. But I want games that the the A category and the B category. This is to be used in HQL (NHibernate Query Language), but I’d like also to know how to do this on SQL.
Assuming
MySQL:The
OFFSETvalue should be the number of items in theINlist minus1, that is if you query for('A', 'B', 'C')then you should useOFFSET 2, etc.