Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Hibernate config
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE hibernate-configuration SYSTEM
- "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="hibernate.dialect">
- org.hibernate.dialect.H2Dialect
- </property>
- <property name="hibernate.connection.driver_class">
- org.h2.Driver
- </property>
- <!-- Assume test is the database name -->
- <property name="hibernate.connection.url">
- jdbc:h2:tcp://localhost/~/Nueva
- </property>
- <property name="hibernate.connection.username">
- sa
- </property>
- <property name="hibernate.connection.password"></property>
- <!-- List of XML mapping files -->
- <mapping resource="negocio/Curso.hbm.xml"/>
- <mapping resource="negocio/Profesor.hbm.xml"/>
- <mapping resource="negocio/Empleado.hbm.xml"/>
- </session-factory>
- </hibernate-configuration>
- Curso.hbm.xml
- <hibernate-mapping>
- <class name="negocio.Curso" table="CURSO">
- <meta attribute="class-description">
- This class contains the employee detail.
- </meta>
- <id name="idCurso" type="int" column="id_curso">
- <generator class="native"/>
- </id>
- <property name="descripcion" column="descripcion" type="string"/>
- <many-to-one name="profesor" column="id_profesor"
- class="negocio.Profesor" not-null="true"/>
- </class>
- </hibernate-mapping>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement