I have a question about correctly handling a recreation of a database.
In my dev environment I often recreate the database by using
_schemaExport.Drop(true, true);
_schemaExport.Create(createResult, true);
(I have to note, that I use the hilo generator.) Right after when I recreated the database, sometimes a save of a new entity fails because of "Cannot insert duplicate key...
" exception.
My question: Would I have to reinitialize the session factory (and maybe even the session) to correctly come in sync with the new hilo-using database? Or sould it work just as is?
Any hint is appreciated!
Lg
warappa