I've method in my DAOImplwhich is intended to get a list of all books belonging to a specific user, from the database... The method looks like this:
@Override
public List<>BooksList> findListsOf(String userId) {
Query query = em.createQuery("SELECT * from BooksList where booksListOwner = unserid");
List<BooksList> resultsList = query.getResultList();
if (resultsList.isEmpty()) throw new NotFoundException();
return resultsList;
}
IntelliJ is showing me this error:
expression or DISTINCT expected, got '*'
What's wrong with my sql statement here?
BR, Mic