This group is for the discussion of the development OF NHibernate, rather
than development WITH NHibernate.  Can you please redirect your inquiry to
the NHUSERS group (http://groups.google.com/group/NHUSERS)?

Thanks,

Steve Bohlen
[email protected]
http://blog.unhandled-exceptions.com
http://twitter.com/sbohlen

On Fri, Oct 31, 2014 at 5:23 AM, Koen Verrijt <[email protected]>
wrote:

> Hello,
>
> I've been trying to update a list of objects which was changed outside of
> the application.
> Here's the statement I use:
>
> Parent parent = Session.QueryOver<Parent>().Where(x => x.Dbid == dbid)
>           .JoinQueryOver<Child>(y => y.Children)
>           .CacheMode(CacheMode.Refresh)
>           .SingleOrDefault();
>
> return parent.Children
>
> This returns the children when a record is added or deleted. This won't
> work when CacheMode is set to normal, which is good.
> Thing is, when I update a child in the database and run this code, it
> returns the old, not updated, children. Even though the query returns the
> correct values, therefore I think this has something to do with caching.
>
> So my question is, why doesn't this statement return the updated children?
>
>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nhibernate-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"nhibernate-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to