using binary type in filter does not work

Description

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

Environment

None

Attachments

1

Activity

Show:

WolfgangW 
January 30, 2007 at 6:29 AM

I hope the priority is OK. I was not sure if "my" development or NHibernate development was meant to be "blocked".

Fixed

Details

Assignee

Reporter

Components

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
Who's Looking?