Fixed
Details
Assignee
Andrea BorieroAndrea BorieroReporter
Alejandro AnadonAlejandro AnadonLabels
Original estimate
Time tracking
No time logged1h remainingComponents
Fix versions
Priority
Major
Details
Details
Assignee
Andrea Boriero
Andrea BorieroReporter
Alejandro Anadon
Alejandro AnadonLabels
Original estimate
Time tracking
No time logged1h remaining
Components
Fix versions
Priority
Created September 13, 2019 at 7:48 AM
Updated September 17, 2019 at 1:00 PM
Resolved September 16, 2019 at 9:15 AM
I have been using version 5.3 (and it has the same issue).
If in hibernate config file, in version 5.3, I put an space after the 'hibernate.hbm2ddl.auto' value, e.g. 'create ' it throws an exception: IllegalArgumentException: "Unrecognized legacy `hibernate.hbm2ddl.auto` value : create).
I saw that in the master version, it was resolved with a trim():
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/tool/schema/Action.java line 153
But, if I try to use a property to generate schema files within the hibernate property config:
javax.persistence.schema-generation.scripts.action and the value has a space: 'drop-and-create ', it keeps throwing the exception.
The solution is very simple: add also a trim() in line 104 for interpretJpaSetting function , not only to interpretHbm2ddlSetting function :
final String name = value.toString().trim();