• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hibernate xml file

 
sinasi susam
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
...and there are tools available to generate them.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic