Hibernate Creating Unwanted Mapping Tables

℡╲_俬逩灬. 提交于 2019-12-07 05:12:26

The reason why you are getting this is because you have ManyToMany relationship between your Seller and SellerPromotion entities. And only way to model a many to many relation is to have join table. That is why hibernate will create a table with the name SELLER_SELLER_PROMOTION and have two columns as per your case. Each will be foreign key to respective tables.

If you are really interested. Get hold of the book called Pro JPA. It explains these concepts beautifully in capter Object relational mapping.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!