Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Author Message
vedran_v
Post subject: Update and Save fails to persist changes to the database  PostPosted: Oct 17, 2008 - 07:52 PM



Joined: Oct 17, 2008
Posts: 3

Hi,

I'm using MyEclipse Hibernate and Spring support. I have created my database table, and managed to successfully connect to the database.

Using MyEclipse reverse engineering, MyEclipse created my DAOs, POJOs and mapping files. I am able to retrieve all data from the database (MySQL) using the classes set up by MyEclipse. However, while trying to update or insert any rows into any of the tables the following occurs.

1) MyEclipse DAOs go through without failure.
2) Retrieving by findAll() method gives me updated data
3) Checking the database there are no changes
4) Trying to update this row from MySQL Administrator reports that the row in question is locked.
5) After killing tomcat lock is released and I can now update changes.

This is very difficult for me to debug for two reasons. First, there are no error messages reported, so not much to start from. Two, I'm a newbie to hibernate, that's one of the reasons I use MyEclipse for this project.

Any help on this issue would be highly appreciated.

Thx in advance,
Vedran
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: Update and Save fails to persist changes to the database  PostPosted: Oct 19, 2008 - 03:27 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 6126

Vedran,
Make sure you are using transaction management for update and save. That should sort this issue out.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
vedran_v
Post subject: Re: RE: Update and Save fails to persist changes to the data  PostPosted: Oct 19, 2008 - 03:45 PM



Joined: Oct 17, 2008
Posts: 3

support-nipun wrote:
Vedran,
Make sure you are using transaction management for update and save. That should sort this issue out.


Nipun,

thank you for your answer. I am working in the same way as it is descibed in MyEclipse Spring Hibernate tutoria (http://www.myeclipseide.com/documentation/quickstarts/hibernateandspring/)l.
Coud you please add a link to a MyEclipse online recource to point me to the right direction?
 
 View user's profile Send private message  
Reply with quote Back to top
vedran_v
Post subject: RE: Re: RE: Update and Save fails to persist changes to the  PostPosted: Oct 19, 2008 - 04:14 PM



Joined: Oct 17, 2008
Posts: 3

I managed to find sufficient resources. Thanks for the correct pointer Nippun.
 
 View user's profile Send private message  
Reply with quote Back to top
support-nipun
Post subject: RE: Re: RE: Update and Save fails to persist changes to the  PostPosted: Oct 20, 2008 - 03:49 PM
Registered Member
Registered Member


Joined: Apr 18, 2007
Posts: 6126

Your welcome.

_________________
Nipun
MyEclipse Support
 
 View user's profile Send private message Send e-mail  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits