In a Seam project (or maybe for kinds of EJB projects using Hibernate?) the database is
created during server start (plus import.sql gets imported). This is an important
difference to e.g. AppFuse (Spring + Hibernate), where the database gets created by an ant
task which you have to call explicetly (btw. this is the better solution in my opinion...
but you can argue about that *g*).
The line texan made bold is an important one. There are two values (as far as I know), and
I experienced the following behaviour:
create-drop: The database is recreated every time your server starts. If there is already
a database it gets dropped before, so all your data entries vanish.
update: The database is only created once, and your data "survives" server
restarts. But if you change your entities by adding new fields the new fields get created
in the database, too (upon server restart, remember ;)). If you delete entity bean fields
the fields in the database remain. And if you change fields (e.g. from type Long to
String, or from @ManyToOne to @ManyToMany) you will run into trouble, so you better do not
do this ;).
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968570#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...