DataException for @Lob column with postgresql DB since 5.2.11

Description

An DataException is thrown when attempting to access string fields created with 5.2.9 or 5.2.10 and annotated with @Lob with > 5.2.11. The reason for this is that with Hibernate, except for 5.2.9 and 5.2.10, a TEXT field is created, but only the id of a BLOB is stored in this TEXT field, while the text is saved as a BLOB. Therefore it is not possible to compare these fields in a query (where x.textLob like "%Test%"). This is not the intended use for TEXT fields in PostgreSQL. Only 5.2.9 and 5.2.10 use the TEXT field to store the conent of the String.
In my opinion, the behavior of 5.2.9 / 5.2.10 should be used as default, even if this leads to compatibility problems with other versions.

Environment

PostgreSQL 9.x, postgresql driver 9.4.x, 42.x

Status

Assignee

Gail Badner

Reporter

Jürgen Simon

Fix versions

None

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Worked in

5.2.9
5.2.10

Components

Affects versions

5.2.11
5.2.12

Priority

Major