Changes for page Custom Mapping

Last modified by Alex Cotiugă on 2022/10/12

From version 1.1 >
edited by Vincent Massol
on 2010/05/31
To version < 1.2 >
edited by Jerome
on 2010/12/23
>
Change comment: Better formatting of the hibernate code block (block vs. inline before)

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.VincentMassol
1 +XWiki.jvelociter
Content
... ... @@ -4,6 +4,7 @@
4 4  1. Define the actual Hibernate mapping for your XClass, in a ##hbm.xml## file (see the example below). This file should then be made available somewhere in the CLASSPATH (##WEB-INF/classes## or in your own JAR file that you put in ##WEB-INF/lib##).(((
5 5  
6 6  Example Mapping file (##mailinglist.hbm.xml##):
7 +
7 7  {{code language="xml"}}
8 8  <?xml version="1.0"?>
9 9  <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN"
... ... @@ -23,6 +23,7 @@
23 23   </class>
24 24  </hibernate-mapping>
25 25  {{/code}}
27 +
26 26  )))
27 27  1. Reference your ##hbm.xml## file in the Hibernate configuration file located in ##WEB-INF/hibernate.cfg.xml##, by adding a ##mapping## element. For example:(((
28 28  {{code language="xml"}}

Get Connected