persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Vinicius Cubas Brand
Hello. I am having a problem with the usage of hibernate and its persistence mechanism. I have an Action with a method for creation of an entity type and other method for updating. This action implements a Preparable and in its method prepare() I verify if the entity is being created or update

Re: persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Toni Lyytikäinen
Hard to say where the problem lies without having a look at the DAO code. Are you using OpenSessionInViewFilter or similar mechanism for lazy loading in the view? If yes, try setting the param singleSession to false like this: OSIVFilter org.springframework.orm.hibernate3.support.OpenSessionI

RE: persistence and doubts on usage of hibernate in struts 2

2008-02-29 Thread Kedar Choudhary
o save the modifications, you can call saveOrUpdate() or merge. Regards, Kedar -Original Message- From: Toni Lyytikäinen [mailto:[EMAIL PROTECTED] Sent: Friday, February 29, 2008 6:19 PM To: Struts Users Mailing List Subject: Re: persistence and doubts on usage of hibernate in struts 2 H