Uploaded image for project: 'Hibernate ORM'
  1. HHH-12201

DataException for @Lob column with postgresql DB since 5.2.11

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 5.2.11, 5.2.12
    • Fix Version/s: None
    • Component/s: hibernate-core
    • Labels:
      None
    • Environment:
      PostgreSQL 9.x, postgresql driver 9.4.x, 42.x
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Worked in:
    • Last commented by a user?:
      true
    • Sprint:

      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.

        Attachments

          Issue links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: