[GLASSFISH-1122] Supply behavior similar to Hibernate @IndexColumn Created: 08/Sep/06  Updated: 06/Mar/12

Status: Open
Project: glassfish
Component/s: entity-persistence
Affects Version/s: 9.0pe
Fix Version/s: not determined

Type: Improvement Priority: Major
Reporter: cayhorstmann Assignee: tware
Resolution: Unresolved Votes: 11
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: Linux


Issuezilla Id: 1,122

 Description   

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.



 Comments   
Comment by pventura [ 09/Sep/06 ]
      • Issue 1122 has been confirmed by votes. ***
Comment by marina vatkina [ 12/Feb/07 ]

resetting the default owner

Comment by ijuma [ 15/Oct/08 ]

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

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

Comment by Tom Mueller [ 06/Mar/12 ]

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

Generated at Wed Sep 02 19:59:12 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.