Fixed
Details
Details
Assignee
Unassigned
UnassignedReporter
WolfgangW
WolfgangWComponents
Fix versions
Affects versions
Priority
Who's Looking?
Open Who's Looking?
Created January 30, 2007 at 5:56 AM
Updated January 30, 2007 at 7:42 AM
Resolved January 30, 2007 at 7:42 AM
When a binary type is specified for a filter parameter, the following condition evaluates to true:
NHibernate.Engine.QueryParameter.ProcessFilter(...) line 406:
if (value != null && typeof(ICollection).IsAssignableFrom(value.GetType())) { ...
because arrays implement ICollection. In that special case value is a byte[] which is interpreted as a collection of filter parameter values instead of a "single" value. So each index of the byte array is mapped to new positional parameter, which results in a where clause like this:
... where test0_.binvalue = ?, ?, ?
See http://forum.hibernate.org/viewtopic.php?t=970359