• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

[Hibernate]key constructor rule

 
Saber Seddik
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate does require at least a package visibility constructor for entities

4.1.1. Implement a no-argument constructor
Cat has a no-argument constructor. All persistent classes must have a default constructor (which can be non-public) so that Hibernate can instantiate them using Constructor.newInstance(). It is recommended that you have a default constructor with at least package visibility for runtime proxy generation in Hibernate.

But do we have the some constraint for Embeddables?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic