Hi,
After upgrading from 3.5.0 to 3.6.1 one of our queries stopped working.
db.select(
.from(USERS)
.where(coalesce(USERS.FIRST_NAME, "").concat(" ").concat(coalesce(USERS.LAST_NAME, "")).likeIgnoreCase("%" + searchTerm + "%")
.or(USERS.PHONE.contains(searchTerm))
.or(USERS.EMAIL.contains(searchTerm)))
started generating this:
select
USERS.FIRST_NAME as FIRST_NAME,
USERS.LAST_NAME as LAST_NAME,
USERS.PHONE as PHONE,
USERS.EMAIL as EMAIL
from USERS, USERS
where ((((coalesce(USERS.FIRST_NAME, ?) || ?) || coalesce(USERS.LAST_NAM
E, ?)) ilike ? or USERS.PHONE like ('%' || ? || '%') escape '!' or USERS.EMAIL like ('%' || ? || '%') escape '!') and (((coalesce(USERS.FIRST_NAME, ?) || ?) || coalesce(USERS.LAST_NAME, ?)) ilike ? or USERS.PHONE like ('%' || ? || '%') escape '!' or USERS.EMAIL like ('%' || ? || '%') escape '!')) limit ?
Dialect: POSTGRESQL. Using generated static table definitions.
Can you please point out if we are doing smth wrong or it's a bug?
Thanks.
Vlad