I am using Hibernate with PostgreSQL. I have an import.sql file that Hibernate executes after the schema is created/validated. It worked under MariaDB, but under PostgreSQL it is not. Tables and constraints are created, but the data is not imported. Here is a sample of the recurring error:
20:24:00,034 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 119) HHH000388: Unsuccessful: INSERT INTO jcat.Student (id,childcare,birthdate,name,class_id)
VALUES (1,
FALSE,
"1992-09-15",
"Douglas",
1)
20:24:00,034 ERROR [org.hibernate.tool.hbm2ddl.SchemaExport] (ServerService Thread Pool -- 119) ERROR: column "1992-09-15" does not exist
It happens in every insert statement. I don't know if single or double quotes are interchangeable, but I tried using both in my import file and none worked. The error log shows that single quotes are converted to double quotes (as you can see above). Maybe there is a Hibernate property I don't know about?
Software versions are PostgreSQL 9.5 and Wildfly 9 with provided Hibernate (most likely 4).