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 have tried setting the property "hibernate.hbm2ddl.auto" to >> both "update" and "create-drop". >> >> however, in both cases, if i drop a table and then subsequently >> try to access the table using a DAO, i receive an exception such >> as: >> >> ERROR JDBCExceptionReporter:101 - Table 'dao_stripes.MockEntity' doesn't >> exist >> >> i was under the impression that table would be automatically >> recreated. is this not the case? if not, do i need to call a method >> to trigger the table creation? > > The table is recreated when you deploy your application. So you need to > do that. > I assume that you are using an IDE that allows you to do this with one > click and that it is ok for your purpose to do that... >> >> thanks for your help, >> lev > > Thomas > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users >
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 SchemaExport() example that i provided earlier. does anybody have any other ideas on the drop/create can be accomplished programatically all in the same application deployment? thanks, lev ------------------------------------------------------------------------------ This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first _______________________________________________ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users