-->
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.  [ 2 posts ] 
Author Message
 Post subject: Delete de n enregistrements
PostPosted: Thu Sep 29, 2005 8:13 am 
Newbie

Joined: Fri Sep 23, 2005 7:39 pm
Posts: 7
Bonjour,

une question toute simple :
comment vider une table d'un seule coup avec hibernate ?

Je ne veux évidemment pas faire une itération sur mes 1 000 enregistrements et les supprimer un à un.

J'ai lu que l'on pouvait avoir recours à une requête dans un session.delete(), mais je n'ai pas trouvé d'exmple.

Est-il possible d'avoir un exemple de syntaxe.

Merci beaucoup.


Top
 Profile  
 
 Post subject: j'ai trouvé
PostPosted: Thu Sep 29, 2005 8:22 am 
Newbie

Joined: Fri Sep 23, 2005 7:39 pm
Posts: 7
En fait, c'était très simple.

session.delete("from xxx where...");


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

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.