Uploaded image for project: 'OpenMRS Core'
  1. OpenMRS Core
  2. TRUNK-5962

Unable to store order templates greater than 255 characters in unit tests

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Should
    • Resolution: Fixed
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Complexity:
      Low
    • Development:

      Description

      In unit tests with H2 and Dbunit, these use hibernate mapping files to generate the schema for the database.  When a property is of type="string", the default column length that it creates is size 255, if there is no explicit length property set on the column in the mapping file.

      For the order_set_member -> order_template column we generate this in our liquibase schema as type "text"

      <column name="order_template" type="text"/>
      

      However, in the hibernate mapping file, it is not given any length, thus defaulting to 255.

      The result of this is that in unit tests, not templates of length > 255 characters can be added.

      We should fix this by specifying a correct length on the hibernate mapping file.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                mseaton Mike Seaton
                Reporter:
                mseaton Mike Seaton
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: