Bonsoir tout le monde,
J'ai un petit souci! Je veux récupérer la dérinère ligne ajouté dans ma base avec ce code ci dessus:
Mais ça me sort cette éxception:
Code : Sélectionner tout - Visualiser dans une fenêtre à part List c = (List) (session.createQuery("select * from Client where id=(select max(id) from Client)").uniqueResult());
Je ne comprends pas pourquoi!!
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5 org.hibernate.hql.ast.QuerySyntaxException: unexpected token: * near line 1, column 8 [select * from ma.hibernate.Client where id=(select max(id) from Client)] org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:31) org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:24) org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:59) ...Est ce que quelqu'un pourrait m'aider
Merci
Partager