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: méthode int delete(string query)
PostPosted: Thu Apr 06, 2006 3:39 am 
Newbie

Joined: Thu Apr 06, 2006 3:19 am
Posts: 3
Bonjour,
J'ai un problème avec la méthode delete de nHibernate, c'est-à-dire qu'au lieu de me créer une requête "delete", elle me crée une requête "select".
Voici le contexte d'utilisation:

la requête:
private const string DELETE_BY_QUERY_DATE = "from AlarmEventValue nev where (nev.TimeStamp between '{0}' and '{1}')";
utlisation de la méthode:
_nhSession.InnerSession.Delete(string.Format(DELETE_BY_QUERY_DATE, startDate, endDate));

je réalise sur chacune de mes méthodes de l'application des test unitaires avec la solution NUnit:
Sur la console de sortie on peut voir le résultat suivant:

NHibernate :select alarmevent0_.BaseEventValueID as BaseEven1_, alarmevent0_.AlarmState as AlarmState, alarmevent0_.BaseEventID as BaseEven5_, alarmevent0_.HistTimeStamp as HistTime4_, alarmevent0_.ProductSegmentID as ProductS6_, alarmevent0_.ModifiedOn as ModifiedOn from Core_BaseEventValue alarmevent0_ where alarmevent0_.EventValueType='A' and (((alarmevent0_.HistTimeStamp between '06/04/2006 09:29:06' and '06/04/2006 09:33:06')))

une requête "select" à la place d'une requête "delete".

Alors si vous avez une explication à ce problème, n'hésitez à me répondre.
Merci.


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.