Will adding an extra column in DB break hibernate?
2 Answers
It will be OK as long as the column is not defined as NOT NULL, or has a DEFAULT value defined.
Insert statements that Hibernate issues will not provide a value for the column (obviously), but the statements it produces will be syntactically correct, even if it doesn't know about the column - the column and its value simply won't be mentioned in the insert statement.
You may consider using a database trigger to maintain values in that column if they must be derived in some special way, although would caution using database kung fu unless it's absolutely necessary, for example if you don't have control over the source code for the hibernate entity classes and the column must be some particular value that couldn't be declared as a column default.
Update and select statements would require no special treatment.