java - JPA/Hibernate - Default data -


When I set the create-drop set as hbm2ddl, then I also need to add the app to some default data Want to

Is it possible to write a few detail in JPA or Hibernation?

Default data = 10 inserts! With a very easy data!

during create or create-drop By default, Hibernate executes SQL statements from the file named import.sql in the classpath (if present), then you can put your SQL script there.

From Hibernate 3.6 you can also specify other files with the property hibernate.hbm2ddl.import_files .

Also see:



Comments