VC in clause

Simulating an SQL IN clause with ADF ViewCriteria API

So again and again I find myself doing the use case of finding a bunch of rows given only a list of Ids. A possible SQL construct that fulfills this need is something like the IN clause which goes like "Where columnX IN  (id1, id2, id3, ... idn )". If you have been doing ADF you know there is no "IN" operator. Googling around might get you to a solution where people are manually just putting the "where IN clause" simply as a string. Of course if you do this, the onus of avoiding an sql injection attack but this method is on you.

Subscribe to RSS - VC in clause