persistence icon indicating copy to clipboard operation
persistence copied to clipboard

Unclear file handling for javax.persistence.schema-generation.scripts.drop-target and javax.persistence.schema-generation.scripts.create-target

Open lukasj opened this issue 8 years ago • 5 comments

It seems unclear in the JPA 2.1 specification whether files specified in the javax.persistence.schema-generation.scripts.drop-target and javax.persistence.schema-generation.scripts.create-target properties are expected to overwrite an existing version of such a file or to append to the file.

It seems that Hibernate has chosen to append to existing files resulting in a growing file if not deleted by other processes.

Affected Versions

[2.1.1]

lukasj avatar Sep 20 '16 19:09 lukasj

  • Issue Imported From: https://github.com/javaee/jpa-spec/issues/135
  • Original Issue Raised By:@glassfishrobot
  • Original Issue Assigned To: @ldemichiel

lukasj avatar Aug 31 '18 16:08 lukasj

@glassfishrobot Commented Reported by JesperTejlgaard

lukasj avatar Sep 20 '16 19:09 lukasj

@glassfishrobot Commented neilstockton said: And DataNucleus JPA seems to overwrite the DDL when I use it which, for my usage, seems like a much better default behaviour.

lukasj avatar Sep 22 '16 09:09 lukasj

@glassfishrobot Commented This issue was imported from java.net JIRA JPA_SPEC-135

lukasj avatar May 05 '17 06:05 lukasj

This seems like low-hanging fruit that could be looked at in the next release and resolved one way or the other? It does appear to be a fairly low priority either way.

Reza Rahman Jakarta EE Ambassador, Author, Blogger, Speaker

Please note views expressed here are my own as an individual community member and do not reflect the views of my employer.

m-reza-rahman avatar May 06 '21 21:05 m-reza-rahman