• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

orm.xml and persistence.xml

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please explain the difference between these two xmls?. What is the purpose of orm.xml?.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
persistence.xml used to define the JDBC driver and connectivtey with database additional that you define the unit name.

orm.xml you can skipped it and use the annotation insted of that.
orm.xml used to mapping object to database.

best regards,
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi juz wan to ask can we use other name like abc.xml instead of orm.xml?

Thanl you very much
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
persistence.xml is for storing database details used behind hibernate. Mostly you have one persistence.xml file in your application which is common for all entities.

orm.xml is mostly used per entity. For employee entity, employee-orm.xml. For Manager entity, manager-orm.xml etc.

Note that i have used the term "mostly". Its bacuse you can have one orm file for all entirties but that is not a good practice.
 
I'm gonna teach you a lesson! Start by looking at this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic