glassfish
  1. glassfish
  2. GLASSFISH-1122

Supply behavior similar to Hibernate @IndexColumn

    Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 9.0pe
    • Fix Version/s: not determined
    • Component/s: entity-persistence
    • Labels:
      None
    • 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.

        Activity

        Hide
        Tom Mueller added a comment -

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

        Show
        Tom Mueller added a comment - Bulk change to set fix version to "not determined" where the issue is open but the value is for a released version.
        Hide
        ijuma added a comment -

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

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

        Show
        ijuma added a comment - Something like this should be part of Glassfish V3 final (not prelude). See: http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/ordered_lists
        Hide
        marina vatkina added a comment -

        resetting the default owner

        Show
        marina vatkina added a comment - resetting the default owner
        Hide
        pventura added a comment -
            • Issue 1122 has been confirmed by votes. ***
        Show
        pventura added a comment - Issue 1122 has been confirmed by votes. ***

          People

          • Assignee:
            tware
            Reporter:
            cayhorstmann
          • Votes:
            11 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: