File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate xml file" Watch "Hibernate xml file" New topic

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?

Jaikiran Pai

Joined: Jul 20, 2005
Posts: 9317

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

Joined: Apr 14, 2004
Posts: 10336

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

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
I agree. Here's the link:
subject: Hibernate xml file
Similar Threads
hibernate xml not found (jboss plug in)
Hibernate error with Spring MVC
Hibernate for small application
How to use middlegen to generate hibernate3.0 mapping file
XML file generation