2 Replies Latest reply on Apr 14, 2009 3:06 AM by gonorrhea

    can seam-gen create the db too?

    gonorrhea

      I have been tasked for developing some template (i.e. generic) functionality for our Seam app template code.


      Specifically, there is a db schema which is required for security, data lists, application settings, etc. that will need to be reverse-engineered to JPA entity classes.


      Our modified version of seam-gen actually runs the DDL via the JDBC driver for Oracle or MSSQL to create the SECURITY_ROLE table.  This table will be replaced and add'l tables are required.


      What I was wondering is if seam-gen can actually create the db instance for us prior to the DDL execution to create the table.  If the db server exists and is running and you have the dbo credentials, is this possible to do using the Ant <sql> task or similar?

        • 1. Re: can seam-gen create the db too?
          dan.j.allen

          So you want the update schema task to run, but for it to run before you start the application (using a target in Ant)? We can certainly use hibernate tools from Ant. That's how seam-gen does it's reverse engineering magic after all. Care to give it a try?


          Or are you asking for a target to run an arbitrary SQL script? In that case, you can absolutely add that to your Ant build. It's not really seam-gen specific.http://ant.apache.org/manual/CoreTasks/sql.html

          • 2. Re: can seam-gen create the db too?
            gonorrhea

            The latter.  It would be seam-gen specific if it was part of the seam setup (interview) and related functionality to create the db, tables, etc.


            We'd like everything to be read db-wise and revengr-wise by the time the Seam dev imports the seam-gen'd project in JBDS...