3 Replies Latest reply on Jan 19, 2008 5:16 AM by maxandersen

    import.sql howto

    mariomoya

      Hi,
      I'm a new user of Jboss Tools, particularly seam dev tools.
      I want to populate the configured database with the import.sql file. I put the sql scripts into that file but nothing happen when deploy the application into Jboss AS.
      Reading http://www.hibernate.org/381.html i know that is an ant task, but the ant file build.xml is not present in the new project, neither persitence.xml (as in a ordinary seam-gen project).
      How is the "Jboss Tools way" of using the import.sql to populate the DB?
      I'm using eclipse europa 3.3, Jboss Tools 2.0.0.GA, seam 2.0.0.GA, and Jboss AS 4.2.2.GA

      Greetings,

      Mario.

        • 1. Re: import.sql howto
          maxandersen

          if you don't see any persistence.xml or import.sql file in the seam projects we create then something is wrong.

          Both files are there; use Ctrl+R to find them.

          • 2. Re: import.sql howto
            mariomoya

            Max, you are right!

            The persistence.xml is present in the project. Sorry!
            Now, changing the property

            <property name="hibernate.hbm2ddl.auto" value="update"/>

            and setting it to
            <property name="hibernate.hbm2ddl.auto" value="create-drop"/>

            means that i can populate the database?

            Thanks,

            Mario.

            • 3. Re: import.sql howto
              maxandersen

              yes, just like in seam-gen...just because its in the IDE doesn't change the behavior ,)