Joined: Fri Jun 30, 2006 12:11 am Posts: 7 Location: Pune
|
Hi,
I am new to Hibernate. I have read that its compulsory to have a default constructor in the java bean (model class which is the object being mapped and saved in the database).
However I know that the compiler doesn't provide the default constructor if a parameterised constructor is created in the class explicitly.
Hence i created a parameterised constructor. But still it works. When i call session.save or session.load() hibernate saves or loads the object present in the database.
Can anyone explain me whether hibernate requires the default constructor. If it doesn't require then how does hibernate instantiate the java bean class using reflection when there is no default constructor present in the class ?
Thanks in advance.
|
|