Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:2.1.1
Hi, everyone,
I encounter an weird problem. I am using hibernate for 2 months. Everything is fine until yesterday. During my testing and debugging my porgrams some time. I found that hibernate re generate all my hibernate mapping tables in my database. Thus all the inserted and commited data by my programs gone. But those data in those tables which are not hibernate mapping table are safe!
I am sure no hacker and virus. It seems hibernate catch some exceptions from my programs then regenerate the tables!
I want to know if hibernate has such attribute i could set to forbid hibernate to re-generate tables?
<class
name="ClassName" (1)
table="tableName" (2)
discriminator-value="discriminator_value" (3)
mutable="true|false" (4)
schema="owner" (5)
proxy="ProxyInterface" (6)
dynamic-update="true|false" (7)
dynamic-insert="true|false" (8)
select-before-update="true|false" (9)
polymorphism="implicit|explicit" (10)
where="arbitrary sql where condition" (11)
persister="PersisterClass" (12)
batch-size="N" (13)
optimistic-lock="none|version|dirty|all" (14)
lazy="true|false"
The above attributes "mutable=false" could forbid this happened?
Does anyone know? I am really frustrated :(
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: