10 Replies Latest reply on Apr 22, 2010 11:12 PM by bart king

    import.sql and hibernate.hbm2ddl.auto doesn't work

    Kiryl Kazakevich Newbie

      Hello.


      I'm new to Seam and trying to use a feature to populate db with import.sql file. In my project I use Jboss 4.2.2, Seam 2.0.2SP1 and Postgres 8.2.


      I put import.sql into root of a jar file that is packacked into ear, persistence.xml looks like this:


      <persistence>
          <persistence-unit name="comix">
              <provider>
                  org.hibernate.ejb.HibernatePersistence
              </provider>
              <jta-data-source>java:/comixDS</jta-data-source>
              <properties>
                  <property name="hibernate.dialect"
                            value="org.hibernate.dialect.PostgreSQLDialect"/>
                  <property name="hibernate.hbm2ddl.auto"
                            value="create-drop"/>
                  <property name="hibernate.show_sql" value="true"/>
              </properties>
          </persistence-unit>
      </persistence>




      On server startup, tables and sequences are created, but tables are empty. Is there any way to check or debug, what is a reason why import.sql is ignored?


      Any help or suggest is appreciated.


      Thanks in advance.