Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-10709

Hibernate SchemaValidation on synonyms

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Minor
    • EAP_EWP 5.3.0.ER1
    • EAP_EWP 5.1.0, EAP_EWP 5.1.1, EAP_EWP 5.1.2, EAP_EWP 5.2.0
    • Hibernate
    • None
    • JBoss EAP 5.2.0 and below
      JBoss EAP 6.1.0 and below

    • Low
    • Hide
      JBoss EAP 5 has been enhanced by providing the ability for Hibernate entities to be validated against table synonyms. Previously, the schema validation would only validate tables and views.

      To enable this new functionality, the `hibernate.synonyms=true` property must be set.

      For example, the following will now pass Hibernate schema validation:

      ----
      "CREATE SYNONYM foo_synonym FOR foo_table"

      @Table(name = "foo_synonym")
      ----
      Show
      JBoss EAP 5 has been enhanced by providing the ability for Hibernate entities to be validated against table synonyms. Previously, the schema validation would only validate tables and views. To enable this new functionality, the `hibernate.synonyms=true` property must be set. For example, the following will now pass Hibernate schema validation: ---- "CREATE SYNONYM foo_synonym FOR foo_table" @Table(name = "foo_synonym") ----
    • Documented as Resolved Issue
    • NEW

    Description

      Description of problem:
      With "hibernate.hbm2ddl.auto=validate",

      if there are synonyms on DB tables, the validation fails.
      Sure, the schema validation could be disabled, but this validation gives a developer a better "security" feeling.

      Upstream Jira/Patch:
      https://hibernate.atlassian.net/browse/HHH-8183

      Version-Release number of selected component (if applicable):
      All up to EAP 6.1.0 Alpha

      How reproducible:
      Always

      Steps to Reproduce:
      1. use synonym on a table name
      2. deploy an application with hbm2ddl = auto

      Actual results:
      Validation error.

      Expected results:
      Validation pass.

      Additional info:
      Pull requests:

      Attachments

        Issue Links

          Activity

            People

              brmeyer_jira Brett Meyer (Inactive)
              adam.kovari Adam Kovari (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: