legacy « HBM « JPA Q&A





1. Legacy database structure Hibernate mapping issue    stackoverflow.com

I am having trouble mapping the following database structure (shortened for brevity with just PKs/FKs and a few extra columns:

Policy

Policy_Id (PK) ...

Risk

Risk_Id (PK) ...

Party

Party_Id (PK) ...

PartyRole

  • PartyRole_Id (PK)
  • Party_Id (FK not-null)
  • Policy_Id (FK)
  • Risk_Id (FK)
  • Party_Role_Type
So ...

2. Legacy Tables vs hibernate.hbm2ddl.auto create    forum.hibernate.org