Add generics test

This commit is contained in:
Timo Westkämper 2014-06-20 15:45:45 +03:00
parent ca4b14e7e1
commit ff8f25c4e6

View File

@ -0,0 +1,35 @@
package com.mysema.query.domain;
import javax.persistence.Entity;
import javax.persistence.MappedSuperclass;
import org.junit.Test;
public class Generic15Test {
@MappedSuperclass
public static abstract class Compound<T extends Containable> {
}
@MappedSuperclass
public static abstract class Containable<T extends Compound> {
private T compound;
}
@Entity
public static class MyCompound extends Compound<MyContainable>{
}
@Entity
public static class MyContainable extends Containable<MyCompound> {
private String additionalField;
}
@Test
public void test() {
// QMyContainable
QGeneric15Test_MyContainable.myContainable.compound
}
}