What is Hibernate mapping file?

  • Hibernate mapping file is used to map java object to the database table.
  • We can have any number of mapping files in a project.
  • Each hibernate mapping file must contain only one <id> tag (or relevant tag <composite-id>)
  • <id> tag corresponds to either primary key or Non primary key. Hibernate need unique key to map
  • Class names and property names are case sensitive in mapping file.
  • Table names and column names are not case sensitive in mapping file.
  • If we don’t give <column> tag, then property name will be column name.
  • If we don’t give table name, then class name will be the table name.

Posted in hibernate and tagged , , .

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">