Files
ebean/platforms
robin.bygrave 32931d6db0 #3848 Fix regression for Sql Server and Oracle with exists() introduced in 18.2.0
Fix #3848: exists() generates invalid scalar SQL on SQL Server and Oracle

Query.exists() generated `select exists(<subquery>)`, which is valid on
Postgres/H2/MySQL but rejected by SQL Server and Oracle since both only
support EXISTS as a predicate, not as a directly selectable scalar boolean
expression.                                                                                                                                                                              ┃
                                                                                                                                                                                            ┃
Add DatabasePlatform.existsWithCaseWhen/existsFromClause capability flags
and use them in CQueryBuilder.wrapSelectExists() to generate
`select case when exists(<subquery>) then 1 else 0 end` on platforms that                                                                                                                ┃
need it, with an additional ` from dual` suffix for Oracle (which requires                                                                                                               ┃
a FROM clause on every select). CQueryExists reads the boolean result via                                                                                                                ┃
ResultSet.getBoolean(1), which correctly interprets the resulting 0/1 int.
2026-07-14 09:15:41 +12:00
..
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-07 09:21:14 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00
2026-07-03 19:38:05 +12:00