Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-21 Thread Oscar Westra van Holthe - Kind
On 20-07-2010 at 17:48, Lev wrote: from the previous emails, i understand that i can employ the import.sql approach to create a database and can drop a database by executing SQL commands. Creating the tables of the database is done by Hibernate. The statements in import.sql are executed after

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-21 Thread Lev
There is no limitation that I can see. The reason one drops a table is because its table structure has changed. And if its structure has changed and you are using JPA annotations then you need to recompile your changed classes anyways and restart your application - which coupled with the

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-21 Thread Nikolaos Giannopoulos
Lev, I don't see this issue though I use update not create-drop. If the tables are dropped via a Test case that I run or through the command line or whatever they are ALL re-created on table read. In fact, the way our app is engineered right now once the App Server is fired up we send an init

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-21 Thread Thomas Menke
Lev wrote: There is no limitation that I can see. The reason one drops a table is because its table structure has changed. And if its structure has changed and you are using JPA annotations then you need to recompile your changed classes anyways and restart your application - which coupled

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-20 Thread Lev
I use this property in my persistance.xml to update tables when I deploy my application: !-- e.g. validate | update | create | create-drop -- property name=hibernate.hbm2ddl.auto value=update / i have tried setting the property hibernate.hbm2ddl.auto to both update and create-drop. however,

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-20 Thread Thomas Menke
Lev wrote: I use this property in my persistance.xml to update tables when I deploy my application: !-- e.g. validate | update | create | create-drop -- property name=hibernate.hbm2ddl.auto value=update / i have tried setting the property hibernate.hbm2ddl.auto to both update and

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-20 Thread Lev
On Tue, Jul 20, 2010 at 5:06 PM, Thomas Menke stripe...@cipher-code.de wrote: Lev wrote: I use this property in my persistance.xml to update tables when I deploy my application: !-- e.g. validate | update | create | create-drop -- property name=hibernate.hbm2ddl.auto value=update / i

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-20 Thread Nikolaos Giannopoulos
Lev wrote: from the previous emails, i understand that i can employ the import.sql approach to create a database and can drop a database by executing SQL commands. however, it seems to be a limitation not to be able to do all of this programatically in the essence of the hibernate

[Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Lev
hi, would anybody happen to know how to recreate (drop, then create) a database with stripersist? further, do you know how to drop/create a specific table within a database? i'm using hibernate with stripersist. thank you for you help, lev

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Thomas Menke
On 07/13/2010 08:22 AM, Lev wrote: hi, would anybody happen to know how to recreate (drop, then create) a database with stripersist? further, do you know how to drop/create a specific table within a database? i'm using hibernate with stripersist. Do you want to change the structure of

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Oscar Westra van Holthe - Kind
On 13-07-2010 at 12:01, Thomas Menke wrote: On 07/13/2010 08:22 AM, Lev wrote: would anybody happen to know how to recreate (drop, then create) a database with stripersist? further, do you know how to drop/create a specific table within a database? i'm using hibernate with

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Lev
On Tue, Jul 13, 2010 at 1:31 PM, Oscar Westra van Holthe - Kind os...@westravanholthe.nl wrote: On 13-07-2010 at 12:01, Thomas Menke wrote: On 07/13/2010 08:22 AM, Lev wrote: would anybody happen to know how to recreate (drop, then create) a database with stripersist? further, do you

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Levi Hoogenberg
You could run each test inside a transaction - just rollback after each test [method] and you're golden. On Tue, Jul 13, 2010 at 11:01 PM, Lev d...@plektos.com wrote: On Tue, Jul 13, 2010 at 1:31 PM, Oscar Westra van Holthe - Kind os...@westravanholthe.nl wrote: On 13-07-2010 at 12:01,

Re: [Stripes-users] stripersist: recreating (drop/create) a database

2010-07-13 Thread Nikolaos Giannopoulos
Lev, I pretty much do the same thing you are asking about... which got tiresome after a while when the tables changed significantly... so the top of my tests run a method to drop the appropriate tables in a @BeforeClass method. Just put the following code into a method and call it from your