Hibernate seems to use setParameterList
to set an array as a single parameter.
The relevant javadoc page shows four versions of setParameterList, but they all accept only named parameters - unlike the setParameter method which has versions with arguments for both name or position.
Thus it appears to be an arbitrary restriction of Hibernate that you cannot pass an array as a positional parameter.
i.e. this code cannot work:
OrmExecuteQuery( "FROM Person WHERE FirstName IN (?)" , [ArrayOfNames] );
The query needs to switched to named parameters, or the positional parameters need to be flattened (e.g. perhaps using ?#RepeatString(',?',ArrayLen()-1)#
or similar.)