在解析应用程序和实体时出现错误。
i = input()
if i == "hello":
print("Hello, " + username + "!")
elif i == "cat":
# ...
elif i == ...:
# ...
这是我的代码
Error: The name 'clientc' is a reserved keyword and can not be used as an entity field name.
ERROR! ERROR! Error while parsing applications and entities from the
JDL Error: The name 'clientc' is a reserved keyword and can not be used as an entity field name.
答案 0 :(得分:0)
自从您使用的版本(v5.0.2)起,JDL的错误消息已得到改进。在最新版本中,错误消息是正确的,Error: The type 'Cat' is an unknown field type for field 'cat' of entity 'Article'.
您需要使用关系,而不是尝试将实体相互嵌入。从entity
部分中删除相关实体,并使用类似于以下内容的方法:
relationship OneToOne {
Stock{article required} to Article{stock}
Article{cat required} to Cat{article}
Clientt{commande required} to Commande{clientt}
LigneCommande{commande required} to Commande{ligneCommande}
LigneCommande{article required} to Article{ligneCommande}
LigneArticle{fournisseur required} to Fournisseur{ligneArticle}
Facture{commande required} to Commande{facture}
}