JBoss Community

NamedQuery problem: TABLE is not mapped

reply from Daniel Winz in EJB 3.0 - View the full discussion

Hello Wolfgang,

 

yes I am using an EntityManager instance to create a query:

 

EntityManagerFactory emf = Persistence.createEntityManagerFactory("Employee-Details");
em = emf.createEntityManager();
EntityTransaction et = em.getTransaction();
et.begin();
Query query = em.createQuery("select e from EmployeeEntity e");
empList = query.getResultList();

 

Does it make a difference to use the @NamedQuery annotation?

 

Kind regards,

Daniel

Reply to this message by going to Community

Start a new discussion in EJB 3.0 at Community