Yes, it fail.
and this other works
[Test]
public void WhenEagerLoadingWithHqlThenNotThrows()
{
using (new Scenario(Sfi))
{
using (var session = OpenSession())
using (var tx = session.BeginTransaction())
{
var query = session.CreateQuery("select b from Blog b join fetch b.Posts
where b.Author = : author")
.SetString("author", "Gabriel")
.SetCacheable(true);
query.Executing(q => q.List<Blog>()).NotThrows();
tx.Commit();
}
}
}On Wed, May 18, 2011 at 12:30 PM, schlachtzeuger <[email protected]>wrote: > Hi > > in 3.2 alpha3 querycaching when eager loading throws. > > > i think (didn't proved that) it was introduced in r5793 so here ist a > failing test for nhibernate\src\NHibernate.Test\NHSpecificTest > \NH2673\CachingWithTrasformerTests.cs: > > > [Test] > public void > WhenEagerLoadingWithCriteriaThenNotThrows() > { > using (new Scenario(Sfi)) > { > using (var session = OpenSession()) > using (var tx = > session.BeginTransaction()) > { > var query = > session.CreateCriteria<Blog>() > .SetFetchMode("Posts", > FetchMode.Eager) > .SetCacheable(true); > query.Executing(q => > q.List<Blog>()).NotThrows(); > tx.Commit(); > } > } > } > > regards andy -- Fabio Maulo
