facebook

Update and Save fails to persist changes to the database

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #290062 Reply

    vedran_v
    Member

    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

    #290078 Reply

    Loyal Water
    Member

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

    #290080 Reply

    vedran_v
    Member

    @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?

    #290081 Reply

    vedran_v
    Member

    I managed to find sufficient resources. Thanks for the correct pointer Nippun.

    #290115 Reply

    Loyal Water
    Member

    Your welcome.

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: Update and Save fails to persist changes to the database

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in