简体   繁体   English

为什么MetaModel参数为null

[英]Why MetaModel parameter is null

I have a very simple model class. 我有一个非常简单的模型课。

@Entity
@Table(name="reach")
public class Reach {

    @Id
    @Column(name = "uid")
    private Long uId;

    @Column(name = "reach_30")
    private Integer reach30;

... getters, setters..
}

And here is my meta model 这是我的元模型

@StaticMetamodel(Reach.class)
public class Reach_ {
    public static volatile SingularAttribute<Reach, Long> uId;
    public static volatile SingularAttribute<Reach, Integer> reach30;
}

And when i print following 当我打印以下

    System.out.println("==============="+(Reach_.uId));
    System.out.println("==============="+(Reach_.reach30));

I get object value for uId BUT NULL for reach30 . 我得到了uId BUT NULL的reach30对象值。 Any idea whats going on here. 不知道这是怎么回事。

Thankx 谢谢

Problem was with eclipse. 问题是日食。 Needed to clean and restart computer to get it working. 需要清理并重新启动计算机才能使其正常运行。 But not a problem with code 但是代码没有问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM