Closed EnmanuelReyes closed 4 years ago
I don't understand well the issue. You don't want all the code related to User entity, but you still want to have a relationship with User ? How is it possible ?
From what you've provided, I'll try to reproduce it!
@EnmanuelReyes are implementing a custom User entity?
@EnmanuelReyes are implementing a custom User entity?
Yes
I don't understand well the issue. You don't want all the code related to User entity, but you still want to have a relationship with User ? How is it possible ?
That should be possible if you generated the User entity.
That should be possible if you generated the User entity.
It should.
Can't you just define and generate your own User entity ?
@EnmanuelReyes you should have provided a JDL sample, that could have avoided a lot of questions :) I'm writing tests right now for this bug to test combinations, and try to reproduce it.
Overview of the issue
Cannot add any relationship with user entity having the option skipUserManagement enabled.
Error: Can't add invalid relationship. Error: Relationships from the User entity is not supported in the declaration between 'User' and 'RequestForm'. You can have this by using the 'skipUserManagement' option. Error while parsing applications and entities from the JDL Error: Can't add invalid relationship. Error: Relationships from the User entity is not supported in the declaration between 'User' and 'RequestForm'. You can have this by using the 'skipUserManagement' option.
Stacktrace:
Error: Can't add invalid relationship. Error: Relationships from the User entity is not supported in the declaration between 'User' and 'RequestForm'. You can have this by using the 'skipUserManagement' option. at ValidatedJDLObject.addRelationship (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/jhipster-core/lib/core/validated_jdl_object.js:102:13) at fillAssociations (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/jhipster-core/lib/parsers/document_parser.js:289:15) at Object.parseFromConfigurationObject (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/jhipster-core/lib/parsers/document_parser.js:67:3) at getJDLObject (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/jhipster-core/lib/jdl/jdl_importer.js:110:25) at Object.import (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/jhipster-core/lib/jdl/jdl_importer.js:88:25) at JDLProcessor.importJDL (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/generator-jhipster/cli/import-jdl.js:70:41) at JDLProcessor.importJDL (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/generator-jhipster/cli/import-jdl.js:298:38) at module.exports (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/generator-jhipster/cli/import-jdl.js:465:21) at Command.command.allowUnknownOption.description.action.args (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/generator-jhipster/cli/cli.js:71:36) at Command.listener (/Users/enmanuelreyes/Documents/Software/silver_night/backoffice-app/node_modules/generator-jhipster/node_modules/commander/index.js:315:8)
Motivation for or Use Case
If I have that option enabled, it should allow me to make a relationship with User without problems.
Reproduce the error
Suggest a Fix
I have been looking in the stacktrace, most calls to validate the relationship are like this one:
As you can see, It doesn't pass the value of the skipUserManagement option, whilst the validator method waits for it.
JHipster Version(s)
JHipster configuration, a
.yo-rc.json
file generated in the root folder.yo-rc.json file
JDL for the Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryUser entity name is reserved if skipUserManagement is not set. ERROR! Error: Error while parsing entities to JDL
Browsers and Operating System
MacOS Catalina