Announcement Announcement Module
Collapse
No announcement yet.
Data not getting displayed while calling find after saveOrUpdate action is performed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Data not getting displayed while calling find after saveOrUpdate action is performed

    Hi All,

    I am able to figure out the problem, but could not able to find how it is happening. I am using getHibernateTemplate().saveOrUpdate(detachedInstan ce); and after saved successfully, I am calling getHibernateTemplate().find("from xyz"); detachedInstance & xyz both are mapped to join table.

    My application is integrated with Struts+Spring+Hibernate, I am calling save action after successfully saved calling list action. In database join table is getting updated with ID's but while retrieving that object is getting null (empty). Even though I do refresh the same exist.

    But after adding and going back to the previous or next page and coming back to the same page then record is getting displayed, this time only list action is called. I am sure it is not refresh action.

    I am using
    <filter>
    <filter-name>hibernateFilter</filter-name>
    <filter-class>org.springframework.orm.hibernate3.support.O penSessionInViewFilter</filter-class>
    </filter>
    and in applicationContext-hibernate.xml using
    <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSes sionFactoryBean"> and calling this in every bean as
    <property name="sessionFactory" ref="sessionFactory"/>


    Can any one help me in resolving this issue

    Thanks in advance

  • #2
    This appears to be a duplicate.............
    http://forum.springframework.org/showthread.php?t=43506

    Comment

    Working...
    X