我使用 Jhipster 在我的应用程序中生成实体。这是jdl文件内容:
entity GameGenre {
name String
}
entity Game {
name String,
description String,
coverImage String,
logo String
}
entity Tournament {
}
// defining multiple OneToMany relationships with comments
relationship OneToMany {
Game{tournaments} to Tournament
}
relationship ManyToMany {
Game{genres} to GameGenre{games}
}
paginate Game with infinite-scroll
paginate GameGenre, Tournament with pagination
dto * with mapstruct
// Set service options to all except few
service all with serviceImpl
filter *
// Set an angular suffix
// angularSuffix * with mySuffix
问题出现在后缀为 QueryService 的类中,例如 GameGenreQueryService、GameQueryService 和 TournamentQueryService。问题出现在方法中:Jhipster 生成的 createSpecification :
/**
* Function to convert TournamentCriteria to a {@link Specifications}
*/
private Specifications<Tournament> createSpecification(TournamentCriteria criteria) {
Specifications<Tournament> specification = Specifications.where(null);
if (criteria != null) {
if (criteria.getId() != null) {
specification = specification.and(buildSpecification(criteria.getId(), Tournament_.id));
}
if (criteria.getGameId() != null) {
specification = specification.and(buildReferringEntitySpecification(criteria.getGameId(), Tournament_.game, Game_.id));
}
}
return specification;
}
Tournament_ 无法解析为变量,Game_ 无法解析为变量
我不知道这种方法期望什么,但这是发生的错误。这是我在 Jhipster 上的错误吗?