-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Default Constructor for Java Bean.
PostPosted: Fri Jun 30, 2006 12:19 am 
Newbie

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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.