Hi all,
I have a strange problem with Eclipselink in Netbeans 8.2/Glassfish 4.1.
The OrderColumn is not respected in fetch operation with an unidirectional OneToMany Relation. Funny thing though: The OrderColumn is set and updated correctly. There is just no "ORDER BY ..." part on the created Query.
I have tried several Versions of Eclipselink, including 2.6.2 and 2.7.1.
public abstract class ShopUser extends LongIdTimestampedEntity implements LongIdComparable<ShopUser> {
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true, fetch=FetchType.LAZY)
@OrderColumn
private List<Telefonnummer> telefon = new LinkedList<>();
...
@Entity
@Inheritance(strategy = InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(length = 8)
@DiscriminatorValue("0")
public class Telefonnummer extends LongIdEntity {
...
}
@MappedSuperclass
@TableGenerator(name = "generalId", initialValue = 0, allocationSize = 10)
public abstract class LongIdEntity implements Serializable {
private static final long serialVersionUID = 0L;
@Id
@GeneratedValue(strategy = GenerationType.TABLE, generator = "generalId")
private Long id;
@Version
private long version = 0;
...
}
Any Ideas?