我有一个非常简单的模型类。
@Entity
@Table(name="reach")
public class Reach {
@Id
@Column(name = "uid")
private Long uId;
@Column(name = "reach_30")
private Integer reach30;
... getters, setters..
}
这是我的元模型
@StaticMetamodel(Reach.class)
public class Reach_ {
public static volatile SingularAttribute<Reach, Long> uId;
public static volatile SingularAttribute<Reach, Integer> reach30;
}
当我打印以下内容时
System.out.println("==============="+(Reach_.uId));
System.out.println("==============="+(Reach_.reach30));
我得到对象值uId
BUT NULL forreach30
。知道这里发生了什么。
谢谢