This content has been marked as final.
Show 6 replies
-
1. Re: SQL script execution on deployment?
michael.yuan Jul 25, 2007 3:06 PM (in response to samdoyle)The import.sql file on the classpath is automatically executed when you have
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
in persistence.xml -
2. Re: SQL script execution on deployment?
samdoyle Jul 25, 2007 8:49 PM (in response to samdoyle)So I take it this will not work if I'm using TopLink for the persistence provider?
-
3. Re: SQL script execution on deployment?
michael.yuan Jul 25, 2007 8:52 PM (in response to samdoyle)"samdoyle" wrote:
So I take it this will not work if I'm using TopLink for the persistence provider?
Right. This is a hibernate property. -
4. Re: SQL script execution on deployment?
samdoyle Jul 25, 2007 9:22 PM (in response to samdoyle)I don't see anyway to do something similiar with TopLink. I've always used TopLink since it is the default provider with GlassFish. Is it trivial to use Hibernate in place of TopLink in GlassFish? This is certainly a useful feature.
-
5. Re: SQL script execution on deployment?
michael.yuan Jul 25, 2007 10:47 PM (in response to samdoyle)Yes, it is trivial to use Hibernate as the persistence provider in Glassfish. You only need to add one line in persistence.xml and put the Hibernate jars on classpath.
-
6. Re: SQL script execution on deployment?
samdoyle Jul 25, 2007 10:54 PM (in response to samdoyle)"michael.yuan@jboss.com" wrote:
Yes, it is trivial to use Hibernate as the persistence provider in Glassfish. You only need to add one line in persistence.xml and put the Hibernate jars on classpath.
Thanks, I'll try it out.