Linq queries that use a fetch statement and are .Cacheable
var query = session.Query<Person>()
.Fetch(p => p.Address)
result in an exception.
NHibernate.TypeMismatchException : Provided id of the wrong type. Expected: System.Int32, got System.Object
This issue is related to NH-2673 Closed which corrects a similar exception when persisting a query to cache. However when the query is retrieved from the cache a similar exception occurs because only the Put and not Get of the caching system was fixed.