getting errors from DAOImpl when I try to get all the cart items that equal to one userId. how do I fix this issue?? thanks for your help.
Here is my ProductDAOImpl.java
@Override
@Transactional
public List<Cart> getCartItems(long userId) {
// get the current hibernate session
Session currentSession = sessionFactory.getCurrentSession();
// create a query
Query<Cart> theQuery =
currentSession.createQuery("from Cart as c where c.user_id= :userId", Cart.class);
// execute query and get result list
List<Cart> cartItems = theQuery.getResultList();
// return the results
return cartItems;
}