You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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,
The text was updated successfully, but these errors were encountered:
No sure why it's changed and when. But use instead IDictionary or IDictionary<string, object>. It should work.
Also it's documented pretty clear in possible breaking changes which I suggest your to inspect before upgrade:
The fact that the underlying type was a HashTable was an implementation detail and users should not have relied on it. They should have coded against IDictionary instead.
It has been changed in #1767 and #305 (#755) for allowing supporting generic dictionaries (IDictionary<string, object>). Fix your code by querying for IDictionary or IDictionary<string, object>. Do not query against the current underlying concrete type.
Before upgrade to NHibernate 5.2.4 i could create a criteria query as following in NHibernate 5.1.1
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,
The text was updated successfully, but these errors were encountered: