Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE hibernate-configuration PUBLIC
- "-//Hibernate/Hibernate Configuration DTD//EN"
- "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
- <hibernate-configuration>
- <session-factory>
- <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
- <property name="hibernate.connection.class_driver">com.mysql.jdbc.Driver</property>
- <property name="hibernate.connection.url">jdbc:mysql://localhost:3306/tpproject</property>
- <property name="hibernate.connection.username">root</property>
- <property name="hibernate.connection.password"></property>
- <property name="hibernate.connection.pool_size">20</property>
- <property name="hibernate.show_sql">true</property>
- <mapping resource="dao/config/ville.hbm.xml" />
- </session-factory>
- </hibernate-configuration>
- <?xml version="1.0" encoding="utf-8"?>
- <!DOCTYPE hibernate-mapping PUBLIC
- "-//Hibernate/Hibernate Mapping DTD//EN"
- "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
- <hibernate-mapping>
- <class name="model.Ville" table="t_ville">
- <id name="id" type="int" column="id_v">
- <generator class="assigned"/>
- </id>
- <property name="nom" column="nom_v" type="string"/>
- </class>
- </hibernate-mapping>
- package model;
- public class Ville {
- private int id;
- private String nom;
- public Ville() {
- super();
- }
- public Ville(int id, String nom) {
- super();
- this.id = id;
- this.nom = nom;
- }
- public void setId(int id) {
- this.id = id;
- }
- public int getId() {
- return id;
- }
- public void setNom(String nom) {
- this.nom = nom;
- }
- public String getNom() {
- return nom;
- }
- }
- `CREATE TABLE IF NOT EXISTS `t_ville` ( `id_v` int(11) NOT NULL, `nom_v` varchar(50) DEFAULT NULL, PRIMARY KEY (`id_v`) )`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement