开发者

java hibernate query.list returns empty list

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.li开发者_运维技巧st it always returns me an empty list

any idea?


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.


If you are adding values in the database from the command prompt manually, perform the commit operation after insertion. especially in oracle DB

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜