Skip to content

Can not create a criteria query with return type of Hashtable #2051

Closed
@futurify-ydang

Description

@futurify-ydang

Before upgrade to NHibernate 5.2.4 i could create a criteria query as following in NHibernate 5.1.1

var list =  _session.CreateCriteria(nameof(Setting))
               .Add(Restrictions.Eq(nameof(_settingColumnName.Key), key))
                .List<Hashtable>();

But i faced the exeption when upgrade to NHibernate 5.2.4
System.ArgumentException: The value "NHibernate.Util.DynamicComponent" is not of type "System.Collections.Hashtable" and cannot be used in this generic collection. Parameter name: value
What is wrong thing here? Please give me a help
Regards,

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions