JPA table with 2 primary key fields
I have a table which contains only 2 fields. The table has a composite PK formed by these two fields. When using Netbeans for creating entity beans from database, the entity bean is not created automatically like other tables that have more than 2 fields. So I guess I need to create the entity bean myself. What is the best practice for creating this entity bean? Does it have to contain COMPOSITE KEY object or not? Xavi López I don't use NetBeans so I can't really say anything about its mapping tools. For mapping a composite key, there are a couple of options. You can Define a separate