No default constructor for entity for inner class in Hibernate

If the class is not static, it requires an instance of the outer class in order to be instantiated – so there will be no default constructor. You’d have to use syntax similar to:

new Supply().new Id();

If the Id class is static, you can just call:

new Id();

Leave a Comment