This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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: 9924
    
158

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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate xml file
 
Similar Threads
XML file generation
hibernate xml not found (jboss plug in)
Hibernate error with Spring MVC
How to use middlegen to generate hibernate3.0 mapping file
Hibernate for small application