This might sound stupid to you,
but why do I need to define an empty constructor in my @Entity
s?
Every tutorial I saw said : every entity needs an empty
From the JPA tag, I suppose that you are working with Java beans. Every bean needs to have the following properties:
Getters and setters for all its main instance variables.
An empty constructor.
All its instance variables should preferably be private
.
Thus the statement : "every entity needs an empty constructor".