Well, this is interesting. What version are you using? Why I ask:
I've never used the config settings to enable hbm2ddl, so I looked in the
docs, which only show
create - drops and creates schema at BuildSessionFactory() (specifically, in the SessionFactoryImpl ctor) and
create-drop - like create, but also drops the schema at ISessionFactory.Close().
Curious as to the 'update' option, I looked in the source (1.2.0 GA) and setting the 'update' option sets an IsAutoUpdateSchema in the settings object, but it doesn't do anything. Here is the excerpt:
Code:
if (settings.IsAutoCreateSchema)
{
new SchemaExport(cfg).Create(false, true);
}
/*
if ( settings.IsAutoUpdateSchema )
{
new SchemaUpdate( cfg ).Execute( false, true );
}
*/
if (settings.IsAutoDropSchema)
{
schemaExport = new SchemaExport(cfg);
}
The commented 'SchemaUpdate' object does not exist. So, at least for that version, setting it to 'update' should do nothing.
As to your actual question: I would use 'create': it will give you a clean slate every time you open an ISessionFactory, but it will also leave the data if you want to look it over after a particular test.