The following snippet is retrieving a Player object instance from the database. How can I make it retrieve only the User instance and then use another query to retrieve a Player instance?
Query q = em.createQuery("SELECT u FROM User u WHERE email = :email", User.class);
User u = (User) q.setParameter("email", email).getSingleResult();
Inherance type is Joined.
Thank you,
Hibernate 4.3.5.Final
EDIT: I could find a question that matches this and already flagged my question as duplicate. Thank you!