Well, if you just store the id (and entity name) in the session, then you
totally circumvent the automatic optimistic locking capability of Hibernate
(you'd be reading the current version number every time instead of just
attempting to reattach the old object).

Squeezers aren't used by the client persistence strategy, unfortunately.  


-----Original Message-----
From: Andreas Bulling [mailto:[EMAIL PROTECTED] On Behalf Of
Andreas Bulling
Sent: Saturday, April 22, 2006 8:55 AM
To: Tapestry users
Subject: Re: tapestry/hibernate sessions & pageBeginRender()

On 22. Apr 2006 - 08:44:59, James Carman wrote:
| Yes, I'm sorry.  I was thinking of my "squeezer" implementation.  The
| persistence strategy will store the object in the session, but reattach it
| when necessary.  You're right.

Well, OK, but what's the advantage of your entity strategy
in this case? ;)

Do you think it's possible to store only the id of the object in the
session? I see a problem with the types of the different objects
because if you want to reattach the object you have to know
which database table (=which Pojo type) to load from, don't you?

I have another question:
I added a squeezer to my application and wanted to see if it works
as expected. I've set breakpoints in the squeeze and unsqueeze
methods but the code never gets excecuted.
Do I have to change @Persist to @Persist("client") on the
page to see the result of the squeezing?

Thanks!
  Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to