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

Implement (proprietary) create-drop setting for javax.persistence.schema-generation.database.action

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 4.3.0.Beta2
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Last commented by a user?:
      true
    • Sprint:

      Description

      I'm having some difficulties with the new JPA 2.1 schema generation options. I think they are all pretty much useless in a real test harness. See https://java.net/jira/browse/JPA_SPEC-53

      Hibernate should implement a (for now) proprietary setting "create-drop". This is the only useful option in the real world.

      Note that this is not equivalent to the old "create-drop" in hbm2ddl.auto. I want CREATE statements when the EMF is build and DROP statements when it is closed. I don't want DROP/CREATE when the EMF is build like hbm2ddl.auto does, nothing has to be dropped before anything was created. All this does is generate warnings. This is a chance to fix this legacy behavior with the new JPA schema generation options.

      I Have to fall back now to manually calling the old SchemaExport in my test harness, as Persistence.generateSchema() is also totally useless - unless you don't have any auto-generated constraint names.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                c.bauer Christian Bauer
                Participants:
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: