I have a database containing a table of messages, where each message entry contains a variable for its author. I also have an ArrayList containing a list of authors. What I'd like to do is to create an SQL query that retrieves all entries from the database where the author exists in the ArrayList.
So something along these lines:
List<Message> result = session.createQuery("from Message where author ISIN ARRAYLIST order by id DESC ").list();
Anyone know how I would go about doing this?