Then I used the command New Seam Generate Entities and the operation seamed OK and has created : - Users.page.xml ; - Users.xhtml ; - UsersEdit.page.xml ; - UsersEdit.xhtml ; - UsersList.page.xml ; - UsersList.xhtml ; - Users.java (the entity) - UsersHome.java - UsersList.java
I did not touch any code generated and I tried to "BrowseData" / UsersList. Then I had these errors : "javax.el.ELException: /UsersList.xhtml: Error reading 'resultList' on type org.domain.test.session.UsersList_$$_javassist_seam_2 Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query Caused by: org.hibernate.exception.SQLGrammarException: could not execute query Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '.users users0_ limit 26' at line 1 " The last error is interesting ! How can I see the real query sent to MySQL Server ?
Isn't it a bug in the Generate Entities tool ?
Before this test, I tried with a Seam example and with the real database (and more complex of course !) on witch I have to work. The same errors occured.
I have initiated the same discussion in French on http://www.developpez.net/forums/d970848/java/developpement-web-java/frameworks/jsf/seam/mapping-bdd-incorrect-generate-entities/#post5449934