Exactly what was on my list to find out today. I moved the stuff to point to mysql so i wanted to avoid the application calling import.sql and dropping tables in the begining.
I did a project search in eclipse to find import.sql string in any file but it failed with no results
I guess i found somewhat here . when you run seam-gen you also see
[input] Do you want to drop and recreate the database tables and data in import.sql each time you deploy? [n] (y,n,)
I have been googleing and found a few mentions of here and there in the context of Seam. Based on what I have found it looks like a Hibernate convenience to load the data. It must be deployed with the ejb jar and must be called import.sql
There is some mention of it here but none of these mention any configuration invloded so I guess there is none
EDIT while conposing this:
I found it in Hibernate docs
Also note that since Hibernate 3.1 you can include a file called "import.sql" in the runtime classpath of Hibernate. At the time of schema export it will execute the SQL statements contained in that file after the schema has been exported.
One problem that exists at least until 3.1.2 is that if you have any "error" in your custom sqls the generation will fail. This makes it impossible to safely drop sequences or indexes before you create them in that file. That is because either you only "create" your stuff which will fail the second time or you "drop" and "create" which will fail the first time since there is nothing to drop.
Thanks for the info. Can we have an existing project that has import.sql for example dvd store .. and we make it an empty file in order to avoid database creation/deletion. would the application complain?
Just don't include the import.sql file in the classpath. I have a project that i created not using Seam-Gen so there was no import file - thats why i didn't know if there was any configuration involved to start using one. I think the sample apps would run ok without data, just would not be very useful.
LOL, that does clear it up nicely, thanks
i am going to have a blank import.sql file once the objects are created in the database.