[coldbox-4.1.0] ormService.executeQuery params argument for WHERE TYPE(x)

When using the executeQuery() method from the cborm module how can I pass in parameters for the TYPE in the WHERE clause? I’ve got some component inheritance defined and I want to query for certain types.

These work (no parameters) because Cat and Dog are not Strings:
ormService.executeQuery(query='select a from Animal a where TYPE(a) = Cat', asQuery=false); ormService.executeQuery(query='select a from Animal a where TYPE(a) in (Cat,Dog)', asQuery=false);

These do not work because I am passing them in as strings:

ormService.executeQuery(query='select a from Animal a where TYPE(a) = ?', params=['Cat'], asQuery=false); ormService.executeQuery(query='select a from Animal a where TYPE(a) in (:classNames)', params={classNames=['Cat','Dog']}, asQuery=false);

But what can I pass in as parameters if not strings – what are the values that TYPE is looking for?

There is another format where you can use .class in the where clause, which uses the discriminator value and works with params as it does expect a string:

ormService.executeQuery(query='select a from Animal a where a.class = ?', params=['C'], asQuery=false); ormService.executeQuery(query='select a from Animal a where a.class in (:classNames)', params={classNames=['C','D']}, asQuery=false);

But I’m curious how to do it with TYPE(a) as I’d like to hide away the implementation dependent on discriminator values as much as possible.

Here is the best example: http://stackoverflow.com/a/8912227/2184705

Thanks!
Wes