-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adding relationships to Authority #11062
Comments
It has always been the case since years. The implementation could be similar to what we do for User, but it will impact jhipster-core, jdl, etc Do you plan to take this ticket @xetys ? |
Maybe, I'm gonna check how my schedule is |
I'm working on this already |
Hi @xetys! I'm available if you need any help dealing with the JCore part. |
I've actually done everything needed in JCore two days ago, I try to push it to a PR tonight, as it worked great. The harder part of this is in the generator, but even here I'm done with the server generator and now I am preparing my self for the frontend part (in particular React, as I've never used React before) But I'm almost done with it |
and ensures using the correct fields in generated files fix jhipster#11062
Can you add/supply code/examples, so that we can test theis addition. |
and ensures using the correct fields in generated files fix jhipster#11062
and ensures using the correct fields in generated files fix jhipster#11062
I'm closing this issue due to inactivity. Please re-open if you have a PR to fix. |
I need help with this issue #14873 |
Overview of the issue
It is possible to create relationships from user-generated entities to the built-in
User
entity, if a user wants to extend the user without modifying the actual user entity. The same thing is not possible to do with theAuthority
entity, because of:Authority
exception. So it either complains about that theAuthority
entity is missing. If we add anentity Authority {}
, it completely overwrites the actual authority and breaks the code deeply.jhipster entity
without errors. However, the generarator is not aware of theAuthority
exception either. The generated code is also broken. It seems, that the manual generator does not check if the related entity actually existMotivation for or Use Case
Adding a relationship to a built-in entity is one way of extending the entity without changing its generated code. It has been possible to do so for a long time already for the user. But not for its corresponding authority entity.
In a current use-case, I was designing a system, which is capable of handling a bigger amount of permissions which itself can be categorized in groups. In addition to this, there are a few more extensions on the authority itself. With this issue here, it is not possible to realize this scenario without extensively changing the generated code.
Reproduce the error
create the following model:
JDL definitions
jhipster import-jdl
will fail to generate an application becauseAuthority
is missing. Here is the actual error:Errorlog of `jhipster import-jdl app.jdl`
If you add the
AuthorityGroup
entity manually by usingjhipster entity
, the code generation will work without any issues, but the generated code will fail in angular frontend code:Errorlog when building frontend code
Related issues
Suggest a Fix
Adding similar handling as we do with
User
today.JHipster Version(s)
6.6.0
JHipster configuration
default settings
The text was updated successfully, but these errors were encountered: