-->
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: error when i try to Update/insert similar Rows.
PostPosted: Wed May 14, 2008 5:23 pm 
Newbie

Joined: Wed May 14, 2008 4:44 pm
Posts: 1
Hello guys,

I´m using Nhibernate 1.1 and .net 1.1. and im passing by this situation:
My client asked me to remove some interface validation (date less than other, not equal zero, etc.) and now im getting an weird error on
this method.

public override void AddToBatch(int expectedRowCount) {
int rowCount = this.ExecuteNonQuery( this.GetCommand() );

if ( expectedRowCount>0 && expectedRowCount!=rowCount )
{
throw new HibernateException("SQL update or deletion failed (row not found)");
}

}


When I try to update/insert in a row that looks identical with other on the grid BUT, they have different Guids ID in NHib Bag, i get the error message.

but when i come back and change on single field (ex: name field) with the same records, the nhibernate does the job and makes the Insert or Update.

have you ever seen something like this?

ps. Im using Sql Server 2005

Thank you very much
ernesto


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.