So, I'm fairly new to annotations, and quite frankly fairly new to Hibernate. Anyway, my situation is, I created several classes and successfully annotated them to create the tables that I wanted. Everything worked great. HOWEVER, if I made a change to a class and had to change the annotations in the class, say add a new field, Hibernate dropped my table and then recreated it.
Well, that's not a good thing as my table had data in it... I was just playing around, so I didn't lose any real info, but it was very disconserting that this is the behavior.
So question is, am I doing something wrong? Is there a way to have changes in annotations use table updates rather than dropping the table?? Do I have to make the change to the table FIRST, then run hibernate and it'll find that the field is there and won't drop the table??
Please help! I really like annotations more than XDoclet, but I can't use them unless I can control how it propogates changes.
Thanks for any help you all can provide!
|