在我的Jhipster生成的文件 entityNameQueryService.java 中,eclipse将以下行指示为错误,但是项目成功编译。 因此,这肯定是Eclipse IDE的配置问题。我自己想不通..
if (criteria.getId() != null) {
specification = specification.and(buildSpecification(criteria.getId(), FRCommunications_.id));
}
错误消息是
“ FRCommunications_无法解析为变量”
供您参考,FRCommunications是我的实体名称。
有人为此解决吗?
答案 0 :(得分:2)
对于日食,在
之后mvn全新安装-nsu
右键单击目标/生成源/注释,然后选择“用作源文件夹”
答案 1 :(得分:1)
JPA static metamodel which is used for JPA filtering in JHipster requires generating classes (named like the entity but suffixed with '_') at build time through an annotation processor, this is configured for maven and gradle so you can run a build and it will generate missing classes.
Alternatively, if you don't want to build using maven or gradle see https://docs.jboss.org/hibernate/orm/5.0/topical/html/metamodelgen/MetamodelGenerator.html#_eclipse