首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Eclipse开发 >

eclipse 中 HQL editor 的配备 和使用

2012-08-31 
eclipse 中 HQL editor 的配置 和使用?Link in :?http://www.springwebdevelopment.com/using-hql-editor-

eclipse 中 HQL editor 的配置 和使用

?

Link in :?http://www.springwebdevelopment.com/using-hql-editor-in-hibernate-tools

Using HQL Editor in Hibernate Tools?

Classpath?Tab

You will need to add any dependant projects and libraries, namely the location of the database driver.

When you click OK in the Hibernate Configuration window – if all is well – the plugin should create a Session Factory and obtain a connection to the database and you should see 3 more nodes – Configuration, Session Factory and Database. If there are problems you will get some errors that you will need to resolve before you can proceed.

Once you have got the configuration right and have your Session Factory then right-click on any node and select HQL editor.

try a straightforward query to test things ie. if you have a table RESULT try typing “from Result2 in the HQL query window. Now click the green Run HQL arrow and you will be able to see the records returned in the Hibernate Query Result view (you may need to open this or it may be lurking behind other views). Youcan also see the SQL that Hibernate generates from the HQL you write in the Hibernate Dynamic SQL Preview view.

Happy HQL’ing!

热点排行