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

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: EAP_EWP 5.1.0, EAP_EWP 5.1.1, EAP_EWP 5.1.2, EAP_EWP 5.2.0
    • Fix Version/s: EAP_EWP 5.3.0.ER1
    • Component/s: Hibernate
    • Labels:
      None
    • Environment:

      JBoss EAP 5.2.0 and below
      JBoss EAP 6.1.0 and below

    • Estimated Difficulty:
      Low
    • Release Notes Text:
      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") ----
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      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

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

                Dates

                Created:
                Updated:
                Resolved: