Named parameters that accepts collections and are used in nullness predicates, fail to bind the value breaking the generated SQL query.
For example
from MarketValue where :codes is null
Will be translated to
select m1_0.id,m1_0.code from market_value m1_0 where
If you bind an empty collectino to :codes
The expected translation would be:
select m1_0.id,m1_0.code from market_value m1_0 where ? is null