我正在使用 HIbernate 版本 3.2.5。
我在休眠教程中阅读了以下行:
The no-argument constructor is a requirement for all persistent classes.Hibernate has to create objects for you, using Java Reflection. The constructor can be private
这是教程的链接:
http://docs.jboss.org/hibernate/orm/3.3/reference/en/html/tutorial.html
但是当我编写一个没有无参数构造函数的持久性类时,它也可以正常工作(我只尝试了检索部分)。
因此,上述陈述的有效性在哪里?
请让我知道我是否穿了一些东西。
问候,