mirror of
https://github.com/querydsl/querydsl.git
synced 2026-07-03 21:07:49 +08:00
Add generics test
This commit is contained in:
parent
ca4b14e7e1
commit
ff8f25c4e6
@ -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
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user