今天看程序发现Hibernate的save(),
看到执行Hibernate的save()会返回一个
查看了Hibernate的API
public Serializable save(Object object)
Parameters:
object - a transient instance of a persistent class
Returns:
the generated identifier
Throws:
HibernateException
看到执行Hibernate的save()会返回一个
查看了Hibernate的API
public Serializable save(Object object)
Parameters:
object - a transient instance of a persistent class
Returns:
the generated identifier
Throws:
HibernateException
是存储对象时生成的主键!
原文地址:点击打开链接