-->
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.  [ 3 posts ] 
Author Message
 Post subject: delete request
PostPosted: Fri Apr 07, 2006 5:38 am 
Newbie

Joined: Thu Apr 06, 2006 3:19 am
Posts: 3
Hello everybody,
i'm a hibernate newbie ;)
I have a problem with the nhibernate "delete" method. I wanted to do a delete, but i only see a "select" request on the database, but no delete.

here is the request:
Code:
private const string DELETE_BY_QUERY_DATE = "from AlarmEventValue nev where (nev.TimeStamp between '{0}' and '{1}')";

and the method call:
Code:
_nhSession.InnerSession.Delete(string.Format(DELETE_BY_QUERY_DATE, startDate, endDate));


I'm doing NUnit tests on each method, and I collect this output from the NUnit GUI:
Code:
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')))


we can see a "select" and no "request"

Could you tell me what I missed, or what I did wrong.
Thanks for your help,
Jeff


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 07, 2006 11:02 am 
Contributor
Contributor

Joined: Wed May 11, 2005 4:59 pm
Posts: 1766
Location: Prague, Czech Republic
Remember to commit the transaction (or flush the session).


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 10, 2006 2:08 am 
Newbie

Joined: Thu Apr 06, 2006 3:19 am
Posts: 3
sergey wrote:
Remember to commit the transaction (or flush the session).


this is already done thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.