Issue Details (XML | Word | Printable)

Key: GLASSFISH-1122
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: tware
Reporter: cayhorstmann
Votes: 11
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Supply behavior similar to Hibernate @IndexColumn

Created: 08/Sep/06 05:01 PM   Updated: 06/Mar/12 10:06 PM
Component/s: entity-persistence
Affects Version/s: 9.0pe
Fix Version/s: not determined

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: Linux


Issuezilla Id: 1,122
Tags:
Participants: cayhorstmann, ijuma, marina vatkina, pventura, Tom Mueller and tware


 Description  « Hide

It is currently not easily possible to implement a collection with List
semantics that purely depends on insertion order. (The current "List" is really
more like SortedSet since it depends on properties of the collection elements,
not their position.)

In Hibernate, this problem is solved by the @IndexColumn annotation.

@Entity
public class Quiz implements Serializable {
@IndexColumn(name = "question_position", base=1)
@OneToMany private List<Question> questions;
. . .
}

This would make a join table such as the following:

Quiz | Question | question_position
-----------------------------------
1001 | 20552 | 1
1001 | 20207 | 2
. . .

As suggested by
http://forums.java.net/jive/thread.jspa?threadID=17660&messageID=146178#146178,
I am requesting this enhancement.



pventura added a comment - 09/Sep/06 10:32 PM
      • Issue 1122 has been confirmed by votes. ***

marina vatkina added a comment - 12/Feb/07 05:27 PM

resetting the default owner


ijuma added a comment - 15/Oct/08 06:03 PM

Something like this should be part of Glassfish V3 final (not prelude). See:

http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/ordered_lists


Tom Mueller added a comment - 06/Mar/12 10:06 PM

Bulk change to set fix version to "not determined" where the issue is open but the value is for a released version.