Thanks for the code.  I'll take a look and see if I can incorporate
this in my application.

One further question, how have people dealt with detached hibernate
objects in the session?  In my case, which I imagine is a common case
for a lot of people, after the user has authenticated, I store the
User object in my Visit object.  The user object is a hibernate
detached entity.  As the user performs actions on the site, I update
the user object including updating lazy loaded collections that map
the user object to other tables.  I suppose I have to reattach the
User object for each request but this doesn't seem terribly efficient.
 What have others done?

On 2/22/06, James Carman <[EMAIL PROTECTED]> wrote:
> Oh, forgot to mention on thing (and that's what this whole thread is all
> about).  There's a new page persistence strategy implemented in there too.
> Just declare your page properties as stored using "entity" like this...
>
> @Persist("entity")
> public abstract Account getAccount();
>
> And, Tapernate will store the object (it has to be a single object at the
> moment; it doesn't support collections) in the session using only its
> identity and automatically reconstitute it when you come back each time.
> Now, if the object is an entity object, but it isn't persistent yet, it'll
> just keep it in the session as-is without translating it into its identity.
> Hope this stuff works for you guys!  Let me know if I can help with
> anything.
>
>
> -----Original Message-----
> From: Andreas Bulling [mailto:[EMAIL PROTECTED] On Behalf Of
> Andreas Bulling
> Sent: Wednesday, February 22, 2006 1:33 PM
> To: Tapestry users
> Subject: Re: hibernate detached objects as persistent page properties
>
> On 22. Feb 2006 - 13:30:00, James Carman wrote:
> | Okay, folks.  I've abstracted out the Hibernate/Tapestry stuff into its
> own
> | project called "Tapernate."  You can download the source and build it
> | yourself (the libs are there for you) from SVN:
> |
> | http://www.carmanconsulting.com/svn/public/tapernate/trunk
>
> *Running to fire up the browser... ;)*
>
> ---------------------------------------------------------------------
> 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]
>
>

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

Reply via email to