7 Replies Latest reply on Dec 22, 2006 12:44 PM by berndschmid

    Db-Dump for Seam Examples ?

    berndschmid

      Hi,

      is there a possibility to get the whole db-dump for the seam examples ? (also create table, ... )

      I like to change on mysql instead of hsql.

      Thanks.

        • 1. Re: Db-Dump for Seam Examples ?

          Just change the datasource/persistence.xml and the tables will be created in whatever database you are using.

          • 2. Re: Db-Dump for Seam Examples ?
            berndschmid

            Thank you very much !!!

            • 3. Re: Db-Dump for Seam Examples ?
              berndschmid

              Not thank you !

              It seems than other people in the forum have also problems to access the database.
              It is really intransparent, how Seam generates the database.

              I succeeded now to create half the db of dvdStore on mysql (break with the import-script) with changed configuration in jboss-beans.xml and persistence.xml.

              It would be much better, if you could generate the db with one
              simple dump and no autogenerating of tables.
              For example, where is the config-file for the generation ?

              I'm sorry I like the examples in Seam, but the handling of the database is not simple and a reason for searching alternatives like Spring.

              • 4. Re: Db-Dump for Seam Examples ?

                Sorry - I have no idea what you are talking about. Hibernate supports automatic table generation and automatic data import if you want to use it. You don't have to use it. Hibernate supports a number of other mechanisms for creating the database or even reverse engineering a model from the database. You are free to use those mechanisms if you prefer. Nothing is stopping you.

                • 5. Re: Db-Dump for Seam Examples ?
                  berndschmid

                  Ok, but where in the DVDStore app the autogeneration of the database starts, where are the files, hibernate (?) reads, to
                  generate the database ?
                  This is complex.

                  Is there another way not to use autogeneration ?
                  Generate the db manually and just start the app ?

                  How can I do this ? What files I must change ?

                  • 6. Re: Db-Dump for Seam Examples ?

                    It automatically generates them from the entities. There are no files involved. If you don't want to generate the database, set hibernate.hbm2ddl.auto to none in persistence.xml.

                    • 7. Re: Db-Dump for Seam Examples ?
                      berndschmid

                      Thank you, now it is clearer for me.
                      I will try again.