Hibernate get method: load entity objects through oid
•
Java
get(Class clazz,Serializable id)
Example
Session session = sessionFactory.openSession(); //创建session对象 UserForm uf = new UserForm(); //定义保存用户信息的JavaBean对象 uf = (UserForm)session.get(UserForm.class,1); //获取OID为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
二维码