-->
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.  [ 8 posts ] 
Author Message
 Post subject: hibernate.properties
PostPosted: Mon Mar 22, 2004 4:12 pm 
Newbie

Joined: Wed Mar 17, 2004 3:33 pm
Posts: 5
Location: Florida, USA
Whats the difference between hibernate.properties and hibernate.cfg.xml?

Which is the preferred one if I include mapping files using configuration API?

The reason I am asking this question... In some of the articles that I am reading, hibernate.properties is being used and in some others hibernate.cfg.xml is being used.

_________________
Regards,
-Vikranth


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 22, 2004 4:49 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
They are equivalent, you can add mapping files to the cfg.xml though. This is nice if you don't want to add them to a Configuration object programatically.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 23, 2004 12:23 pm 
Newbie

Joined: Wed Mar 17, 2004 3:33 pm
Posts: 5
Location: Florida, USA
So, basically hibernate.cfg.xml provides extra features when compared to hibernate.properties. Then, why not just deprecate hibernate.properties. From a beginners point of view, I think it adds up confusion to have two different files basically doing the same job.

OR is there any other specific reason for which hibernate.properties is still being used?

_________________
Regards,
-Vikranth


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 24, 2004 10:08 pm 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
I am curious about this question, also.

Why do we need both?

Is hibernate.properties preferred for standalone apps?

Drew


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 5:26 am 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It's optional. Really, don't complain about free features. If we remove it, 50% would scream NO, the other 50% YES.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 10:48 am 
Newbie

Joined: Wed Mar 24, 2004 10:51 am
Posts: 12
It's not a complaint at all.

I was just trying to understand why both exist and if one is preferred over the other.

I just started using Hibernate, so I don't know the history behind this.

Drew


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 12:42 pm 
Newbie

Joined: Wed Mar 17, 2004 3:33 pm
Posts: 5
Location: Florida, USA
Chris, Thanks for the info and please do not think it as a complaint. I was just trying to understand.

I really respect you guyz for the hardwork you do with the open source and especially with Hibernate for the quick and useful responses you provide us.

You da best.

_________________
Regards,
-Vikranth


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 25, 2004 4:38 pm 
Beginner
Beginner

Joined: Tue Mar 23, 2004 4:18 pm
Posts: 45
Well, the difference is that you MUST define mappings.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 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.