Query query = session.createQuery("from Client c where c.Login=?");
query.setParameter(0, monClient.getLogin(), Hibernate.STRING);
Query query2 = session.createSQLQuery("Select max(idclient) from Client");
List<Integer> list2 = query2.list();
Ces deux requettes donnent:
javax.servlet.ServletException: org.hibernate.hql.ast.QuerySyntaxException: Client is not mapped [from Client c where c.Login=?]
org.hibernate.hql.ast.QuerySyntaxException: Client is not mapped [from Client c where c.Login=?]
Quote:
org.hibernate.hql.ast.util.SessionFactoryHelper.requireClassPersister(SessionFactoryHelper.java:181)org.hibernate.hql.ast.tree.FromElementFactory.addFromElement(FromElementFactory.java:110)
Qu'elle sont les erreures. Merci