saveOrUpdate « Entity « JPA Q&A





1. Unknown entity error in Hibernate during session.saveOrUpdate()    coderanch.com

Hi All, I am trying to save data using session.saveOrUpdate(obj). Here obj is a bean object and is returned by calling a method from a class that is in another jar. The bean class is also defined in this jar file. For e.g in below Market.hbm.xml file, the Market bean is in the jar file and the package points to the ...

2. cannot saveOrUpdate entity    forum.hibernate.org

Hi, I'm facing a problem with Hibernate 3.2.1 GA tied with Spring framework. I think the problem is due to how I use Hibernate. 1- I load an object A (Class C id 1) through a Hibernate Session. 2- I store object A in memory. 3- In a transaction, I open a new Hibernate Session 4- In this Hibernate Session, I ...

3. Problem with SaveorUpdate(T entity)    forum.hibernate.org

I'm working on a e-commerce site and using nhibernate code to add or edit new products. When i add new product the SaveOrUpdate(newProduct) function seems to work fine, however, if i try to update existing product, the function doesn't work Below is my code: public void btnSave_Click(object sender, EventArgs e) { Product newProduct; if (this.prID.Value == "0") newProduct = new Product(); ...