Uploaded image for project: 'NHibernate [Moved to GitHub]'
  1. NH-2856

Retrieval of cached query with Fetch throws exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: 3.2.0.GA
    • Fix versions: 3.3.0.CR1
    • Components: Linq Provider
    • Labels:
      None
    • Sprint:

      Description

      Linq queries that use a fetch statement and are .Cacheable

      var query = session.Query<Person>()
      .Fetch(p => p.Address)
      .Cacheable();

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              danielg Daniel Guenter
            • Votes:
              9 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Who's Looking?