Nicholas thanks for the answer,

I realized that my post was not clear.

Suppose this:
the session1 has load one order and its rows,
the session2 has load the same order than the session1,
the session2 deletes one row from the order,
if you try to refresh the order from session1 it throw an exception
because it tries to read the deleted row too.

the REFRESH method should discard the order, and all its rows from the
session and load again the order and the rows without the deleted one.

may be now is more clear.

how do you solve this problem in your application?

Thanks
Alessandro


On 14 Gen, 15:52, Nicholas Kilian <[email protected]>
wrote:
> Can you post some code samples?
>
> I use entity.Refresh myself with the session-per-winform pattern and it
> works fine.
>
>
>
>
>
>
>
> -----Original Message-----
> From: [email protected]
>
> [mailto:[email protected]] On Behalf Of Alessandro C.
> Sent: 14 January 2011 12:40 AM
> To: Castle Project Users
> Subject: AR Force reload an entity
>
> I need to refresh an entity (and all its children) from the database.
> I tried ActiveRecordMediator.Refresh(entityname) but nothing happens on the
> database and the entity is the same as before.
>
> I tried ActiveRecordMediator.Evict(entityname) before Refresh but nothing.
>
> How can I force the entity reload?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Castle Project Users" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group 
> athttp://groups.google.com/group/castle-project-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-users?hl=en.

Reply via email to