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

Better encapsulate SchemaManagementTool (OGM) - unify JPA schema generation and hbm2ddl capabilities

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 5.1.0
    • Components: None
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      At the end of the day, the point of this enhancement request is to better encapsulate SchemaManagementTool such that OGM etal can really truly replace that service. This is a multi-faceted request.

      The main consideration is the org.hibernate.tool.schema.spi.Target contract as it is passed to the individual delegates of the SchemaManagementTool. Target assumes that schema management commands are representable as Strings as they are in RDBMS/JDBC environment. For OGM however that is often not the case. To cater for that, Target should no longer be passed into the SchemaManagementTool delegates. Instead, the SchemaManagementTool implementation or its delegates should interpret any config and decide itself what to do. In that sense, Target would become an internal detail within the standard ORM SchemaManagementTool implementation.

      Another facet involves unifying the JPA schema generation and hbm2ddl capabilities. At the moment OGM would not be able to override how JPA schema generation works. We obviously need to account for that. The corollary to Target on the JPA schema-gen side is org.hibernate.jpa.internal.schemagen.GenerationTarget. They are pretty equivalent except that Target accepts commands one by one, whereas GenerationTarget accepts them all at once. Seeing how org.hibernate.jpa.internal.schemagen.JpaSchemaGenerator is not replaceable by the user or integrations at all anyway, dramatically changing these contracts and/or moving them around is not a major concern.

        Attachments

          Issue links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 33h 19m
                  33h 19m