[英]jhipster import-jdl filter error creating entities filters
我有一個用Jhipster 4.9制作的項目,在我的Linux中,我有jhipster 4.13.3
當我運行' jhipster import-jdl src / model / Model.jdl '
我得到這個錯誤
正在解析jdl。 發生錯誤:SyntaxError錯誤消息:預期的“ / ”,“ angularSuffix”,“ dto”,“ entity”,“ enum”,“ except”,“ microservice”,“ noFluentMethod”,“ paginate”,“ relationship”, “搜索”,“服務”,“ skipClient”,“ skipServer”,['\\ n'|'\\ t'|'\\ r'|' '| | ],[A-Z_]或輸入結尾,但找到“ f”。*
這是我的Model.jdl
/**
* Generated by JHipster IDE plugin
*/
entity Region {
regionName String
}
entity Country {
countryName String
}
// an ignored comment
/** not an ignored comment */
entity Location {
streetAddress String
postalCode String
city String
stateProvince String
}
entity Department {
departmentName String required
}
/**
* Task entity.
* @author The JHipster team.
*/
entity Task {
title String
description String
}
/**
* The Employee entity.
*/
entity Employee {
/**
* The firstname attribute.
*/
firstName String
lastName String
email String
phoneNumber String
hireDate ZonedDateTime
salary Long
commissionPct Long
}
entity Job {
jobTitle String
minSalary Long
maxSalary Long
}
entity JobHistory {
startDate ZonedDateTime
endDate ZonedDateTime
language Language
}
enum Language {
FRENCH, ENGLISH, SPANISH
}
relationship OneToOne {
Country{region} to Region
}
relationship OneToOne {
Location{country} to Country
}
relationship OneToOne {
Department{location} to Location
}
relationship ManyToMany {
Job{task(title)} to Task{job}
}
// defining multiple OneToMany relationships with comments
relationship OneToMany {
Employee{job} to Job,
/**
* A relationship
*/
Department{employee} to
/**
* Another side of the same relationship
*/
Employee
}
relationship ManyToOne {
Employee{manager} to Employee
}
// defining multiple oneToOne relationships
relationship OneToOne {
JobHistory{job} to Job,
JobHistory{department} to Department,
JobHistory{employee} to Employee
}
// Set pagination options
paginate JobHistory, Employee with infinite-scroll
paginate Job with pagination
dto * with mapstruct
filter * except JobHistory,Region
// Set service options to all except few
service all with serviceImpl except Employee, Job
// Set an angular suffix
angularSuffix * with mySuffix
.jdl在Eclipse中未顯示任何錯誤。 我正在嘗試實現過濾實體。
任何人都可以幫助我。
我將項目更新為jhipster 4.13.3,它似乎可以正常工作。 但是代碼生成時出錯,錯誤代碼為Location_,Country_類,其中包含代碼中的引用,但在任何地方都不存在。 所以我必須創建類@StaticMetamodel(Employee.class)公共類Employee_
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.