You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by shetc <sh...@bellsouth.net> on 2008/08/20 00:51:23 UTC

Hibernate automatic dirty checking not working

Hi All,

I have a Wicket-based project that is using Spring & Hibernate to persist
data. I have followed the
examples set out in the "Wicket in Action" book. That is:

1) Use the Open Session in View pattern to get a Hibernate session per
request -- I am using the
    Spring OpenSessionInViewFilter filter class and
2) Use the Spring <tx:jta-transaction-manager /> and <tx:annotation-driven
/> tags to handle
    transactions via the application server's transaction manager (in this
case, WebSphere);
    methods are marked with the @Transactional where required.

Problem Scenario
a) I have a main WebPage that uses Hibernate to load an object graph. The
contents of the graph
    are displayed using a list. Each item in the list includes a link.
Clicking a link causes an Adobe
    PDF form to be displayed -- this is done by using a RequestTarget.
b) The user submits the Adobe PDF form. On submit, the form is posted to a
second processing WebPage.
c) The processing WebPage reloads the original object graph and modifies a
property based on
    data posted from the Adobe PDF form.

The problem is that modifications to the object graph are not persisted to
the database even
though I assume Hibernate's automatic dirty checking would take care of it.

I am looking for help here as I am not sure if I have a Hibernate issue or a
Wicket/Spring one.
Any help will be gratefully received.

Thanks,
Steve

-- 
View this message in context: http://www.nabble.com/Hibernate-automatic-dirty-checking-not-working-tp19060207p19060207.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Hibernate automatic dirty checking not working

Posted by Uwe Schäfer <us...@thomas-daily.de>.
shetc schrieb:

> The problem is that modifications to the object graph are not persisted to
> the database even
> though I assume Hibernate's automatic dirty checking would take care of it.

just guessing, but make sure that the second page (the modifing one) 
does open a transaction. i don´t have a clue of spring, but i´ve heard 
of @Transactional.

cu uwe

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Hibernate automatic dirty checking not working

Posted by shetc <sh...@bellsouth.net>.
Ignore all this -- I made a very basic error in one of my Hibernate
mappings.:blush:
-- 
View this message in context: http://www.nabble.com/Hibernate-automatic-dirty-checking-not-working-tp19060207p19061053.html
Sent from the Wicket - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org