mirror of
https://github.com/querydsl/querydsl.git
synced 2026-06-13 21:01:01 +08:00
#153 fixed annotation handling issues
This commit is contained in:
parent
15145a9e5a
commit
41fd689d5f
@ -115,6 +115,7 @@ public final class ExtendedTypeFactory {
|
||||
TypeElement typeElement = (TypeElement)declaredType.asElement();
|
||||
switch(typeElement.getKind()){
|
||||
case ENUM: return createEnumType(declaredType, typeElement, p);
|
||||
case ANNOTATION_TYPE:
|
||||
case CLASS: return createClassType(declaredType, typeElement, p);
|
||||
case INTERFACE: return createInterfaceType(declaredType, typeElement, p);
|
||||
default: throw new IllegalArgumentException("Illegal type " + typeElement);
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
package com.mysema.query.domain;
|
||||
|
||||
import java.lang.annotation.Annotation;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
import javax.persistence.EmbeddedId;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.MappedSuperclass;
|
||||
|
||||
import org.junit.Ignore;
|
||||
|
||||
@Ignore
|
||||
public class AnnotationTypeTest {
|
||||
|
||||
@MappedSuperclass
|
||||
public static abstract class BaseObject<T extends Annotation> {
|
||||
|
||||
}
|
||||
|
||||
@Entity
|
||||
public static class Person extends BaseObject<javax.persistence.Id> {
|
||||
@Id
|
||||
private Long id;
|
||||
}
|
||||
|
||||
@Embeddable
|
||||
public static class Address extends BaseObject<javax.persistence.EmbeddedId> {
|
||||
@EmbeddedId
|
||||
private String street;
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user