key « Collection « JPA Q&A

1. Hibernate collections with a table without a key colum

Hi i have 2 tables one like this. i am using hibernate version 3.6.5

public class User implements {
    private Integer id;

2. Collection without foreign key

3. Collection table key

I have a many-to-many relationship in my application (between Assessments and QuestionGroups) that I expressed in the following manner: When I use the schemaexport tool my associative table looks almost exactly as one would expect: create table Assessment_QuestionGroup ( assessmentID BIGINT not null, questionGroupID BIGINT not ...

4. Automatic Population of Collection Key

Newbie Joined: Wed Jun 08, 2005 11:26 am Posts: 1 Hi I'm having a problem understanding what is happening when I save an object with collections. I've had a good dig around the documentation and the FAQs but think I'm perhaps just making the wrong assumptions. If you look at the mapping files below, when I save a LearningObjectVO (subclass of ...

5. Setting foreign key in collection when saving.

The problem is generic (not specific to these classes). I've probably misunderstood the way collections work but I haven't been able to sort it out via google/ persistance with hibernate. I have 2 classes: Code: public class MemoryBO extends AbstractBO { protected int userId; protected String title; protected String contents; ...