model « Association « JPA Q&A





1. How to model an association target using a key object?    forum.hibernate.org

How can I substitute a key object for a reference to the target class of an association? Some classes in my application model an association to another class using a key object. In other words, the source of a relationship does not contain an instance of the associated object, but contains instead an identifier object for the associated instance. Here's an ...

2. How to model a polimorphic association? Advices needed    forum.hibernate.org

Imagine this case. I've got several domain objects, such as User, Item, Collection, Review, Comment, Vote, etc... In my application happens that a single object is associated with several very different objects. This association is therefore mandatory, unidirectional, and polimorphic by nature, since this object can be associated with different type of objects each time. For example, a Comment can be ...

3. Help Me in Modelling the information in Association table.    forum.hibernate.org

Hi , I have to make a simple test application using Hibernate . Problem statement is like this - ----------------------------------------------------------------------- A student can enroll for many courses and for each course a student is enrolled he can have marks . WE have to provide add, delete display functionality for this requirement . ----------------------------------------------------------------------- The Database tables that i have made are ...

4. Help Me in Modelling the information in Association table.    forum.hibernate.org

Hi , I have to make a simple test application using Hibernate . Problem statement is like this - ----------------------------------------------------------------------- A student can enroll for many courses and for each course a student is enrolled he can have marks . WE have to provide add, delete display functionality for this requirement . ----------------------------------------------------------------------- The Database tables that i have made are ...

5. Refactoring a model to use only many-to-one associations    forum.hibernate.org

Hello I have a collection in my model that contains a set of 'previous versions' of domain object. The previous versions are therefore 'immutable' and we will never want to update them. Also the versioned domain object is fairly complex and causes heavy database access to retrieve. When I have a new version of one of these objects I want to ...