Stop Hibernate mangling the "::" casts in the native SQL

FixEmailService
Shipped
August 5, 2026 at 11:33 PM UTC
Author
Kamo
Commit
ad9be48

Hibernate's native-query parser treats "::" as an escaped colon and forwards a single ":". CockroachDB received **************** ARRAY[]:text[]), ' ') and rejected it with: at or near ":": syntax error. The statement is valid SQL -- it prepares and executes fine by hand -- which is what made this look like a missing database function rather than a client-side rewrite. updateSearchVector shares its transaction with the search_index insert, so that syntax error rolled the insert back too and the table could never fill. Coalesce the joined string rather than the array, which needs no cast at all, and build the label filter with CAST(? AS UUID) instead of ?::uuid -- the same trap, waiting on any search using label:.

All changes

Like what you see shipping?

Every one of these updates lands in your workspace automatically. Start free and watch it grow week after week.

Start Free ForeverView Pricing