views:

2083

answers:

1

I had a property that used to be not-null="true". Values aren't necessary for that field anymore so I changed it to not-null="false" but the table does not get updated in the database. Adding new properties doesn't give any problems.

Is it possible for hbm2ddl.auto=update to change the the table automatically to remove the not-null="true"? (I know I can just write a sql script to change it but would like to let it get updated automagically)

+1  A: 

From what I could gather: hbm2ddl.auto=update won't change not-null value for tables that already have data in.

In the end I just wrote a sql script to change the table.

Wilhelm Kleu