aspose file tools*
The moose likes Spring and the fly likes getHibernateTemplate().saveOrUpdate() not saving  the value in database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "getHibernateTemplate().saveOrUpdate() not saving  the value in database." Watch "getHibernateTemplate().saveOrUpdate() not saving  the value in database." New topic
Author

getHibernateTemplate().saveOrUpdate() not saving the value in database.

pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300


i call getHibernateTemplate().saveOrUpdate(transientInstance); but the value is not storing in the database.
and
below is my application.context .xml file




Please tell me.
Peter Mularien
Author
Ranch Hand

Joined: Sep 06, 2007
Posts: 84
Hard to say without seeing how you've mapped the Hibernate object, but typically this occurs if you haven't set the version property correctly (or incorrectly indicated to hibernate what the version of an unsaved entity is).


Author, Spring Security 3 (the Book), Packt Publishing, 2010
SCJP, OCP
pankaj semwal
Ranch Hand

Joined: Oct 07, 2008
Posts: 300
now its saving the data in the database.
i set this property true in hibernate config.xml;

<property name="connection.autocommit">true</property>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getHibernateTemplate().saveOrUpdate() not saving the value in database.
 
Similar Threads
running before I can crawl ( or how to add Spring to an existing Hibernate standalone app)
login form with database and spring security
Hibernate with Spring
I am getting org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity:
Dependency injection problem