Bonjour,
Je suis débutant en hibernate et je travaille sous wampServer.
J'ai utilise JEE pour réaliser mon application mai la problème est quand je faire une exécution tous les données des mes tables de ma base de données sont perdu et les tables sont créer de nouveau et leur contenu est vide.
voila la code de hibernate.cfg.xml de mon application
J'ai vraiment besoin de l'aide
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <!-- Database connection settings --> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="connection.url">jdbc:mysql://localhost:3306/BD</property> <property name="connection.username">root</property> <property name="connection.password"></property> <!-- JDBC connection pool (use the built-in) --> <property name="connection.pool_size">1</property> <!-- SQL dialect --> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <!-- Enable Hibernate's automatic session context management --> <property name="current_session_context_class">thread</property> <!-- Disable the second-level cache --> <property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property> <!-- Echo all executed SQL to stdout --> <property name="show_sql">true</property> <!-- Drop and re-create the database schema on startup --> <property name="hbm2ddl.auto">create</property> <mapping resource="dao/Employe.hbm.xml"/> <mapping resource="dao/Superviseur.hbm.xml"/> <mapping resource="dao/Technicien.hbm.xml"/> <mapping resource="dao/Materiel.hbm.xml"/> <mapping resource="dao/Logiciel.hbm.xml"/> <mapping resource="dao/DemandeLog.hbm.xml"/> <mapping resource="dao/DemandeMat.hbm.xml"/> <mapping resource="dao/Ticket.hbm.xml"/> </session-factory> </hibernate-configuration>
Je vous remercie
Partager