-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Creation de triggers en mode create-drop
PostPosted: Mon Apr 28, 2008 10:57 am 
Newbie

Joined: Wed Feb 27, 2008 10:47 am
Posts: 6
Bonjour a tous,

J'ai une config Hibernate 3 / Spring / Tomcat / Mysql


Dans un fichier spring j'ai le paramètre de defini :

<entry key="hibernate.hbm2ddl.auto" value="create-drop" />

Cela fonctionne tres bien pour mes tables, je démarre tomcat ma base est créée je stop tomcat, ma base est supprimée.

Dans ma base j ai des triggers défini dans un fichier hbm.xml comme cela :

<hibernate-mapping>
<database-object>
<definition
class="com.util.db.UtCountSceneProcedureDefinition">
</definition>
</database-object>
</hibernate-mapping>

Quand je démarre ma base ils sont créés quand je stop ils sont supprimés.

Le probleme est que la procedure create et la procedure drop sont faites 3 fois chacunes. Du coup j ai pas mal de logs d'erreurs m'indiquant que le trigger existe deja.


J'ai déclaré mon fichier xml comme dans le point 5.7. Objets auxiliaires de la base de données : http://www.hibernate.org/hib_docs/reference/fr/html/mapping.html

ma classe java extends AbstractAuxiliaryDatabaseObject.

Avez vous une idée?
merci beaucoup
Flo


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.