my dog learned polymorphism
The moose likes Object Relational Mapping and the fly likes Hibernate xml file Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Databases » Object Relational Mapping
Reply 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: 8141
    
  52

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Hibernate xml file
 
Similar Threads
hibernate xml not found (jboss plug in)
How to use middlegen to generate hibernate3.0 mapping file
Hibernate for small application
XML file generation
Hibernate error with Spring MVC