I have the hibernate.hbm2ddl.auto=create-drop
setting but I also create a view based on one of the tables in SQL after hibernate generates the database using hibernate.import_files=db/create.sql
.
The next time it runs hibernate cannot drop the existing table because the view depends on it.
How do I make hibernate drop table cascade so that the view gets dropped as well?
Defining the entity like this doesn't seem to have an effect
@Entity
@OnDelete(action = OnDeleteAction.CASCADE)
@Table(name = "MY_TABLE")