Juan Maya: thanks a lot!!

On Mon, Nov 16, 2009 at 4:39 PM, Juan E. Maya <maya.j...@gmail.com> wrote:
> Tapestry-hibernates contributes a new strategy "entity". This way only
> the id of hibernate entities are saved on the session and the module
> takes care of recreating the object during the next request.
>
> Check: http://tapestry.apache.org/tapestry5/tapestry-hibernate/userguide.html
> look for Using @Persist with entities.
>
> If u want to put the entities ids in the sesssion by yourself u could
> still make use of the HibernateEntityValueEncoder provided by
> Tapestry-hibernate to recreate the entity.
>
> On Mon, Nov 16, 2009 at 4:22 PM, Alfonso Quiroga <alfonsose...@gmail.com> 
> wrote:
>> Thanks for replies! I think the easier approach is to save the object
>> ID in the session, as Szemere said. Someone has used
>> tapestry-hibernate and knows what happens in this cases? it stores the
>> real objetct in web session and then it merges with de new
>> hib-session? thanks again
>>
>> On Mon, Nov 16, 2009 at 2:36 AM, Jonathan Barker
>> <jonathan.theit...@gmail.com> wrote:
>>> This also depends on your objectives.
>>>
>>> If you have a detached entity in your session, then you have the option to
>>> check for changes in the DB when you try to save, and then present some kind
>>> of conflict resolution screen, rather than blindly overwriting or accepting
>>> changes made in another session.  Having said that, "blindly accepting /
>>> overwriting" is usually fine for my applications and I *usually* store the
>>> id.
>>>
>>> Jonathan
>>>
>>>
>>> On Fri, Nov 13, 2009 at 9:18 AM, Szemere Szemere <
>>> szemereszem...@googlemail.com> wrote:
>>>
>>>> Afaik any Hibernate object stored in the HTTPSession will be
>>>> Hibernate-detached between HTTP requests. It is not refreshed/merged
>>>> automatically on a new HTTP request, so it will be outside the Hibernate
>>>> session on the second request which is probably not what you want.
>>>>
>>>> It is generally a much better idea to store the object id in the session
>>>> and
>>>> recreate it at the beginning of each new HTTP request. Tapestry has some
>>>> features to make this easy for you, but that's beyond my expertise (search
>>>> the mailing list).
>>>>
>>>> Szemere
>>>>
>>>
>>>
>>>
>>> --
>>> Jonathan Barker
>>> ITStrategic
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to