Closed paris0120 closed 2 years ago
You might need to add this at the bottom:
microservice Category, Topic, Comment, User with forum
That's the only difference I see between your JDL and reactive-ms.jdl
.
You might need to add this at the bottom:
microservice Category, Topic, Comment, User with forum
That's the only difference I see between your JDL and
reactive-ms.jdl
.
Thank you for the quick reply. I checked with https://github.com/jhipster/jdl-samples/blob/master/microservices-blog-store.jh and find that I shouldn't include User in the entity.
You might need to add this at the bottom:
microservice Category, Topic, Comment, User with forum
That's the only difference I see between your JDL and
reactive-ms.jdl
.
Sorry for bothering you again but I keep getting
WARNING! Error at 'Category' definitions: 'otherEntityRelationshipName' is set with value 'category' at relationship 'user' but no back-reference was found at 'user'
Since User is managed by jhipster, how to fix the Error?
Again thank you for your time.
That's just a warning. I believe @mshima added it. Everything still works fine in my experience.
That's just a warning. I believe @mshima added it. Everything still works fine in my experience.
Thank you.
Sorry for bothering you again but I keep getting
WARNING! Error at 'Category' definitions: 'otherEntityRelationshipName' is set with value 'category' at relationship 'user' but no back-reference was found at 'user'
should be fixed in main
Could this 'microservice' option be renamed on v8? first, it should be an 'application' option for types 'gateway' instead of a generic option, then this 'microservice' keyword is not that self-explanatory, 'routed' or 'proxied'
Closing, since doubts have been answered
Overview of the issue
Based on https://www.jhipster.tech/user-entity/ and https://www.jhipster.tech/creating-microservices/#generating_entities, microservice with oauth2 should include a User class. However, when I try to include user in a relationship, I got ERROR! Error during import-jdl: The entity User which is declared in forum's entity list doesn't exist.
Motivation for or Use Case
Reproduce the error
jhipster jdl the following .jdl file
application { config { baseName forum, applicationType microservice, packageName com.spring.microservice, authenticationType oauth2, prodDatabaseType mysql, devDatabaseType h2Disk, reactive true, serviceDiscoveryType eureka } entities Category, Topic, Comment, User }
entity Category { name String required, description String required, created Long required, modified Long required, deleted Long
}
entity Topic { title String required, content String required, created Long required, modified Long required, deleted Long
}
entity Comment { content String required, created Long required, modified Long required, deleted Long }
relationship OneToMany { Category to Topic{category}, Category to Category{parentCategory}, Topic to Comment{topic}, Comment to Comment{parent}, }
relationship ManyToOne { Category{user} to User, Topic{user} to User, Comment{user} to User,
}
Related issues
Suggest a Fix
JHipster Version(s)
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System