-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: how to forbid hibernate to re-generate tables
PostPosted: Thu Apr 07, 2005 8:15 am 
Newbie

Joined: Thu Apr 07, 2005 7:56 am
Posts: 3
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:


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.