Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-4881 OpenMRS should support Postgresql
  3. TRUNK-5758

Adding support to use old native hibernate generators

    XMLWordPrintable

Details

    • Sub-task
    • Status: Closed
    • Should
    • Resolution: Fixed
    • None
    • Core 2.4.0
    • None
    • Low

    Description

      For backward compatibility of sequences after hibernate 5 for db relying on tables for sequences add property hibernate.id.new_generator_mappings=false. Starting with Hibernate 5, this is set to true by default. Thus we get the error that hibernate_sequence could not be found. This is the default sequence that hibernate uses whenever no matching sequence is found. Remember that OpenMRS relies on sequences that are created in liquibase changesets and mapped via hibernate mappings.

       See here : https://docs.jboss.org/hibernate/orm/5.2/userguide/html_single/Hibernate_User_Guide.html

       

      For example when creating a patient we get the error:

      org.postgresql.util.PSQLException: ERROR: relation "hibernate_sequence" does not exist while creating patient.

       

      Gliffy Diagrams

        Attachments

          Activity

            People

              aman Aman Mishra
              aman Aman Mishra
              Daniel Kayiwa Daniel Kayiwa
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: