Hi,

Once you have the object built up, you could reattach it to the session with 
saveOrUpdate() which will figure out if it needs to insert or update. This 
assumes you are using the Spring Hibernate wrapper templates.

cheers,
Steve


On 14/01/2010, at 9:47 PM, Rodolfo Cartas wrote:

> Hi! I'm currently working on a wizard to modify a pojo extracted from a 
> database with Hibernate. I don't want to commit any changes to the db before 
> the user finishes the wizard, but the pojo loses reference to the original 
> session. Shall I eagerly fetch the object to avoid any hibernate session 
> reference exceptions?
> 
> Thanks,
> 
> Rodolfo
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to