After calling list () in a sleep request, which you expect to just return a list of Foo objects (see example below), what is the best way to handle this situation?
Query query = session.createQuery("from Foo");
List list = query.list();
I especially don't like this:
public List read() { ... }
When I would prefer:
public List<Foo> read() { ... }
Do you expect calling method calls to the reader method to be added to Foo for each element? Is there a good way to force the read method to return a List <Foo>?
source
share