-->
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: update Error
PostPosted: Mon Jun 16, 2008 4:15 am 
Newbie

Joined: Fri Jun 13, 2008 11:27 am
Posts: 6
When i call the update(Obj) hibernate give me a error:Batch update returned unexpected row count from update [0]

the following is my code:

customer=customerManager.getCustomerByCustomerId(customerId);

customerManager.saveCustomer(customer);


The DAOImpl:

public boolean saveCustomer(TblCustomerInfo customerInfo) {



getHibernateTemplate().update(customerInfo);
return true;
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 16, 2008 8:14 am 
Expert
Expert

Joined: Fri Jul 13, 2007 8:18 am
Posts: 370
Location: london
Your update is failing. Either there's no object in the database matching your customer's primary key or you've got a key mapping error.


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.