Hibernate OnDelete Cascade not working for MySql but Works on postgres and Ms-Sql
问题 I'm having 2 Entities. Thread entity and Post entity using OnetoOne mapping from Post->Thread. A Thread entity contains Numerous Posts . I know i should have used OnetoMany instead of OnetoOne, but for avoiding all the Collections problems i'm using OnetoOne Now the problem is, when i delete a Thread , all the post associated with it must also be removed. I'm successful in doing it by using @OnDelete(action = OnDeleteAction.CASCADE) But it works only on Postgres and Ms-SQl but not on MySql