Skip to content

NH-3864 - Cacheable Multicriteria/Future'd query with aliased join throw exception #1344

Closed
@nhibernate-bot

Description

@nhibernate-bot

Pawel Owerko created an issue — 25th April 2016, 10:03:34:

Short scenario:

session.QueryOver<Person>()
.JoinAlias(x => x.Children, () => childAlias);

var multiCriteria = s.CreateMultiCriteria();
multiCriteria.Add("myQuery", query);
multiCriteria.SetCacheable(true);

Execution:

multiCriteria.List()

Will throw exception:

System.InvalidCastException : Unable to cast object of type 'namespace.Person' to type 'System.Object[]'.

Same for

  .JoinQueryOver(x => x.Children, () => childAlias);

The bug actually lies is in MultipleQueriesCacheAssembler Disassemble method.


Pawel Owerko added a comment — 25th April 2016, 10:16:59:

Commit with failing tests:
itmagination@0ef5918

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions