How do I load a collection of entities of a given class, with only a single trip to the database, e.g.:
public Collection<Object> getEntities(Class<?> entityClass,Collection<Serializable> listOfIDs);
I know that if I were only wanting to fetch a single entity, I could use:
sessionFactory.getCurrentSession().get(Class,Serializable);
but there doesn't seem to be a matching option for a collection of Serializables.
Note that as I only know the class, I don't know the name of the Identity Column, so simple HQL / Criteria API is not an option, without first discovering the ID column.