我爱Aspx >> Asp.Net >> struts和hibernate简单问题/**
* @param args
*/
private Session session;
private Logger log;
public static void main(String[] args) {
MyTest myTest = new MyTest();
try{
myTest.setUp();
myTest.testCreateDomains();
myTest.testAddRemoveRelation();
//myTest.listBooks();
myTest.tearDown();
}catch(Exception e){
e.printStackTrace();
}
}
private void testCreateDomains(){
Transaction tx = session.beginTransaction();
Book book = new Book();
book.setAuthor("Sebastian");
book.setTitle("Hibernate in Winter");
book.setBorrowallowed(new Short((short)1));
session.save(book);
tx.commit();
tx = session.beginTransaction();
Customer customer = new Customer();
customer.setFirstname("Carsten");
customer.setLastname("Liebzeit");
Ҷƪл˵?
用spring创建sessionFactory时的..[07-06]
正在做一个登录的程序,请教各位..[07-06]
兄弟们,求救了!如何让wince下地..[07-06]
net程序到底需不需要框架[07-06]
struts+hibernate+sql2000出现下..[07-06]
关于局部变量,全局变量,实例变..[07-06]
div等元素的疑问?[07-06]
求一段根据服务器字段全选的JS代..[07-06]
linux 如何录音保存为.wav文件-..[07-06]
DirectInput8中使用mouse的问题[07-06]