aspose file tools*
The moose likes Object Relational Mapping and the fly likes Hibernate xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate xml file" Watch "Hibernate xml file" New topic
Author

Hibernate xml file

sinasi susam
Ranch Hand

Joined: Jul 15, 2005
Posts: 67
I want to use hibernate to store and retrieve datas instead using jdbc.

I have read some about Hibernate and at the end i reached that We need xml files for mapping to tables.

This is something painful.
For every query i need an xml file.
what if the project is very huge?For example a job of 500 /1000 servlets and helper classes?

Now i need 500 xml files.Every where is going to filled up with xml files.

Any other way to configure Hibernate else?

Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10066
    
163

Originally posted by sinasi susam:
I want to use hibernate to store and retrieve datas instead using jdbc.

For every query i need an xml file.



You dont need a xml file for a query. You can have a single xml file which contains mappings for your database tables with the java objects. The xml files are used for mapping the tables with the java objects.


[My Blog] [JavaRanch Journal]
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

...and there are tools available to generate them.


JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
jQuery in Action, 2nd edition
 
subject: Hibernate xml file