[coldbox-5.6.2] [cborm-2.3.0] executeQuery

Hi,

I am using executeQuery for a SELECT for the first time and I am getting an error.

Here’s my call*:
prc.TempProducts = ProductService.executeQuery(query =“SELECT ProductID FROM Product WHERE ProductID > 100”, asQuery = true);

This fails with:

Can’t cast Object type [Number] to a value of type [Component]

Similarly:
prc.TempProducts = ProductService.executeQuery(query =“SELECT ProductName FROM Product WHERE ProductID > 100”, asQuery = true);
Fails with:
Can’t cast String [A test product name] to a value of type [Component]

And lastly:
prc.TempProducts = ProductService.executeQuery(query =“SELECT ProductID, ProductName, ProductCode FROM Product WHERE ProductID > 100”, asQuery = true);

Fails with:

Can’t cast Object type [[Ljava.lang.Object;] to a value of type [Component]

*Ultimately this is not the query I want to execute, but if I can’t get the above working, I’ve got no chance with doing this:

SELECT TOP 1 ProductID, ProductName, ProductCode, SUBSTRING(ProductCode, 3, 4) AS CC, try_cast(SUBSTRING(ProductCode, 3, 4) AS int) AS TEST
FROM tbl_Product
WHERE (ProductCategoryID = 1)
AND (try_cast(SUBSTRING(ProductCode, 3, 4) AS int) > 900)
ORDER BY TEST

Any suggestions?