-->
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.  [ 2 posts ] 
Author Message
 Post subject: Constructor in Hibernate persistent class.
PostPosted: Thu Jul 06, 2006 12:06 am 
Newbie

Joined: Wed Jun 28, 2006 1:03 am
Posts: 14
Trying to understand the Hibernate Reference Doc :

In the doc, Section 4.1.1 (Hibernate Reference Documentation Version: 3.1.3 link : http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#persistent-classes-pojo ), there are these sentences/statements :

Quote:
There are four main rules to follow here...
4.1.1. Implement a no-argument constructor
Cat has a no-argument constructor. All persistent classes must have a default constructor (which may be nonpublic) so that Hibernate can instantiate them using Constructor.newInstance().




But I can't find the fore-mentioned constructor in the whole of the Cat.java class code.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 06, 2006 12:12 am 
Beginner
Beginner

Joined: Tue Jun 28, 2005 2:43 pm
Posts: 29
Location: Silicon Valley
It's implicit. Cat extends Object, which has a no-arg constructor. If you define no other constructor, Java implicitly defines a no-arg constructor.


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

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.