child « Composite « JPA Q&A

1. Hibernate - automatically assign foreign key to child?

Ok, so I have 2 objects, Parent and Child. The child basically looks like this:

public class Child implements Serializable 

    // primary (composite) key
    private ...

3. child with composite key

4. Persisting child objects with Composite key

Author Message unmarshall Post subject: Persisting child objects with Composite key Posted: Thu May 03, 2007 2:08 am Newbie Joined: Tue May 01, 2007 5:48 pm Posts: 6 Hi All, I have a parent table - ENDPOINT. This table has a primary key (ENDPOINT_ID) which is just a one-up-number. There are some other fields for this table as well. ...