If I have method which use Hibernate, like this:
public <T> T typedQuery(Query q, Class<T> type) {
List<T> results = q.list();
//result will be null or empty List ?
}
If query won't get any record from table, result
will be null
or empty List?
It will return an empty list, if there are no results. Relevant post
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.