This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
1. Create a Java EE 7 web project 2. Generate entities from database in this project using the sample db 3. Generate new DB script from these entities 4. Create a new Derby database in NetBeans 5. Execute the generated script against the new database => Command execution fails with: Error code -1, SQL state 42X01: Syntax error: Encountered "CREATE" at line 2, column 1. Line 1, column 1 Execution finished after 0 s, 1 error(s) occurred. You need to add semicolons at the end of each line to make it work. The IDE should do that automatically.
may it be considered as eclipselink issue? is there any use case when generation of sql script without semilolons may be applied.
I would like to cloase as won't fix, I can't find any api either in jpa spec or eclipselink specific to specify separator between sql commands, if jpa spec/eclipselink doesn't care and itself generate script this way, it just works this way. also tried to add props.put("javax.persistence.database-product-name", dbconn.getJDBCConnection().getMetaData().getDatabaseProductName()); props.put("javax.persistence.database-product-version", dbconn.getJDBCConnection().getMetaData().getDatabaseProductVersion()); to properties passed to persistence generator and it doesn't matter, commnds are just placed on each line separately
according to above comment