I'm trying to write a select query using DSL.max on a custom field, i.e., a DSL.field constructed using jsonb, but I'm getting this error when running the following query (specific names obscured):
Field (cast("schema"."table"."field" #>> '{property}' AS schema.enum_type)) is not contained in Row (max(cast("schema"."table"."field" #>> '{property}' AS schema.enum_type)))
It looks like DSL.max requires that the field be a real column in the table, i.e., in the Record definition. Am I understand that correctly? Is there a way to do what I'm trying?
Thanks!