Hibernate load method: load entity objects through oid
•
Java
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
二维码