pk « Association « JPA Q&A





1. one-to-many associations with assigned PK    forum.hibernate.org

Parent parent = new Parent(); parent.setName("parent"); parent.setId("XXXXX"); Child child = new Child(); ...

2. many to many association without PK    forum.hibernate.org

Hi I have a object Node with : class Node { private int id // PK private int objId ..... other properties } and object Element with: class Element { private int id // PK private int nodeObjId ........ other properties } and i try to create many-to-many relation between them by objId and nodeObjId. Do you have any idea ? ...