I’m having a difficult time do the following with the JPA CriteriaBuilder:
SUBSTRING( field, LENGTH( field ) - 7 )
The database I am using does not have a RIGHT function, if it did I could just do the following:
builder.function( "RIGHT", String.class, fieldExp, builder.literal(7) );
But no dice. While CriteriaBuilder DOES have a substring function expression I cannot figure out how to do the substraction from LENGTH for the literal 7.
Any thoughts? TIA
Alright, got it.