Ortus ORM casting error with Lucee 6+

I recently discovered the Ortis ORM and been testing with it as we attempt to upgrade some applications to Lucee 6.

Does the Ortis ORM extension support version 6 of Lucee?

We ran into some casting errors moving from Lucee 5 to 6 that other users have also experienced (lucee dev links below). Are there works arounds or open bug tickets for these issues?

I provide a code sample to reproduce the issues in the link:

Thanks!

I can confirm that we have not certified the ORM extension in Lucee 6. The issue you are seeing is related to the changes Lucee made in v6 to represent numbers as BigDecimal types. We will probably need to add conditional switching for Lucee versions to handle these changes

1 Like

@jclausen Could the fix be as simple as removing the toString() wrapper in SQLCaster.java?

From src/main/java/lucee/runtime/db/SQLCaster.java

			case Types.DECIMAL:
				return Caster.toString(Caster.toBigDecimal(value));

@Colby Possibly, though you would have to take it up with Lucee to change that. Have you tried:

person.setBalance( javacast( "BigDecimal", 12345.123456 ) );

to see if that will bypass the casting attempt ( and stringification ) ?

No luck with the javacast there. The entitySave(person) doesn’t have an issue. It is the ORMExecuteQuery where the parameter is bound that there is the issue. I played around with javacast there as well without luck.

How would one go about contacting the Lucee team? In the past I’ve posted to the forum with success but I have 3 bug reports out there without any response from anybody at Lucee.