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

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


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


      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.


          Issue links



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


                • Created:

                  Time Tracking

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