I'm struggling with Entities that use Java generics (see
http://openjpa.208410.n2.nabble.com/ArgumentException-when-using-generics-tp5073975p5073975.html
for more information). I was wondering if someone could provide me a working
example of this scenario with OpenJPA v1.2.2.

[code]
@MappedSuperclass
@Inheritance(strategy= InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name="TYPE")
public abstract class ViesResponse<MSG extends ViesMessage> extends
IdentityObject {
[/code]

[code]
@Entity
@DiscriminatorValue("VATR")
@NamedQueries( {
        @NamedQuery(
                        name = "VATRResponse.findResponsesByMsgId",
                        query = "select r from VATRResponse r where 
r.message.id=:msgId")}
)
public class VATRResponse extends ViesResponse<VATRMessage> {
[/code]
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/Example-with-generics-tp5102789p5102789.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to