public abstract class A<T> {
@Id
protected Long id;
@Column("parent_id")
protected Long parentId;
@One(field = "parentId")
protected T t;
...get set
}
public class B extends A<B> {
@Column
private String name;
...get set
}
会出错
java.lang.IllegalArgumentException: Pojo(class java.lang.Object) without any Mapping Field!!
at org.nutz.lang.reflect.fast.java.lang.IllegalArgumentException$FC$771b43c8ff10640d00bd1ca7eaf926cb.invoke(IllegalArgumentException.java) ~[nutz-1.r.68.v20190621.jar:?]
at org.nutz.lang.born.AbstractConstructorBorning.call(AbstractConstructorBorning.java:25) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
at org.nutz.lang.born.ConstructorBorning.born(ConstructorBorning.java:19) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
at org.nutz.lang.born.BornContext.doBorn(BornContext.java:60) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
at org.nutz.lang.Mirror.born(Mirror.java:1025) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
at org.nutz.lang.Lang.makeThrow(Lang.java:159) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
at org.nutz.dao.impl.entity.AnnotationEntityMaker.make(AnnotationEntityMaker.java:273) ~[nutz-1.r.68.v20190621.jar:1.r.68.v20190621]
如果
@One(field = "parentId")
protected T t;
在子类则正常。
这个是BUG吗?