Results 1 to 2 of 2

Thread: spring hibernate not update item.....

  1. #1

    Question spring hibernate not update item.....

    i am beginner in spring
    in my project i use spring + hibernate

    i update my object using this.getHibernateTemplate().update(item);

    it is not update my item.

    but when i use
    Session session = getSession();
    Transaction tx = null;

    tx = session.beginTransaction();
    session.update(item);
    tx.commit();

    it is update completely my item

    so i don't understand why this.getHibernateTemplate().update(item); it not update my item

    plz replay answer on jpatel@logicom.in

  2. #2
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    13,629

    Default

    Please use the search as this question has been answered numerous times before. You probably haven't configured transactions (and only adding a TransactionManager isn't configuring transactions!). I suggest a read of the spring reference guide and not to use HibernateTemplate (it isn't recommended anymore since hibernate 3.0.1).
    Marten Deinum
    Java Consultant / Pragmatist / Open Source Enthousiast / Author


    Pro Spring MVC: With Web Flow
    Conspect

    Have you read the reference guide.
    Use the [ code ] tags, young padawan

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •