Hibernate load method: load entity objects through oid

load(Class theClass,Serializable id)

Example

Session session = sessionFactory.openSession();  //创建Session对象
UserForm uf = new UserForm();  //定义保存用户信息的JavaBean对象
uf = (UserForm)session.load(UserForm.class,1);  //查询编号为1的用户信息
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>