hibern8ide 配置使用

hibern8ide 配置使用- -                                     

 

hibern8ide 作为hibernate的辅助工具,可以帮助我们调试HQL语句。
 
1。环境:
Ant  1.6.0
jdk 1.4
 
2。先下载ant 然后配置好 ANT_HOME  在PATH 中加入 %ANT_HOME%/bin
下载 hibernate 2.1
下载 hibernate-extensions-2.1.2 里面有hibern8ide2.1
将 hibernate2.1和hibernate-extensions-2.1.2 放到用级目录
 
3。编译运行hibern8ide
首先修改一下 build.xml 的22行,去掉/java目录,否则会报找不到这个目录
在运行 ant init
编译初始化 hibern8ide
 
ant run 运行
这里注意的是我把 jdbc的驱动放到了 hibern8ide/lib 目录下面,并将.zip文件改为.jar文件了,
您也可以自己手动修改 build.xml文件 将jdbc驱动加进去。
 
Hibern8IDE ? 使用(翻译害怕大家看不懂,就直接贴出来了)
If you write your Java code in the “HQL Commander” there is something you must know!

Java code: you can execute every kind of Java code, even not Hibernate-related! Whit this tool you can try your pieces of code quickly!
session: if you write java code you can use the “session” build-in object to interact with the underlying Hibernate session
commit: when you finish to manipulate data you can make a “session.flush()” and commit the changes with “session.connection().commit()”
import: if you use object that need import you can write your “imports” at the top of your code
output: the output window, below the code textfield, prints the “toString()” of the last value returned by the code (if not assigned); if this value is a Collection the output is one row for item:
if you execute “session.find(“from HUser”);” the output is the whole collection, one “HUser.toString()” each row; if you execute “List list=session.find(“from HUser”);“ no output is produced because the result is assigned to a variable, but you can write “list;“ on the second line of the code to see the list in the output window!
inspection: by double-clicking on an item in the output window you can inspect that object!
 
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值