users@glassfish.java.net

A complex _at_OrderBy definition (JPA/Toplink)

From: <glassfish_at_javadesktop.org>
Date: Sat, 23 Jun 2007 01:41:07 PDT

Hi!
I have 3 dummy Entity Bean:

@Entity
class A {

    @OneToMany
    @OrderBy ( " c" )
    private Collection<B> vB;

}

@Entity
class B {

    @JoinColumn(name = "personal_info", referencedColumnName = "id")
    @ManyToOne ( cascade = CascadeType.ALL )
    private C c;

}

@Entity
class C {

    @Column(name = "my_field")
    private String myField;

}

How to for @OrderBy in class A references to field C.myField?
Toplink doesn't recognize @OrderBy ("c.myField") :(
Thanks!
[Message sent by forum member 'akira_ag' (akira_ag)]

http://forums.java.net/jive/thread.jspa?messageID=223635