In @Finder annotation returnAs() has default value Collection.class. However,
if you forget to specify it, it throws an exception because it cannot create an
instance of class Collection.class. e.g.
// the following will throw an exception.
@Finder(namedQuery = "MyNamedQuery")
List<MyEntity> someQuery(@Named("name") String name);
// this is fine
@Finder(namedQuery = "MyNamedQuery", returnAs = LinkedList.class)
List<MyEntity> someQuery(@Named("name") String name);
returnAs() should either have no default value, to enforce the user to specify
it, or have LinkedList.class/ArrayList.class as a default value.
Original issue reported on code.google.com by vesko.m....@gmail.com on 19 Aug 2013 at 1:52
Original issue reported on code.google.com by
vesko.m....@gmail.com
on 19 Aug 2013 at 1:52