问题
I am using hibernate with JPA annotations and Jboss transaction manager I build the session factory open up a session and create a query when i use query.list it always returns me an empty list
any idea?
回答1:
Few suggestions:
Enable configuration parameter show-sql
in persistence.xml
. Try this, i.e.
<property name="hibernate.show.sql" value="true" />
Furthermore, it is better to format that using,
<property name="hibernate.format_sql" value="true" />
And then try to run the same query in some SQL Client.
来源:https://stackoverflow.com/questions/6841113/java-hibernate-query-list-returns-empty-list