-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
New CLI commands: rename-entity and remove-entity #8933
Comments
Why would you need rename if you have remove and add?
…On Sat, 8 Dec 2018, 11:07 am Aurélien Mino ***@***.*** wrote:
*Overview of the feature request*
rename-entity would rename an existing entity and update all related
entities
remove-entity would remove an existing entity only if no other entity is
related
*Motivation for or Use Case*
As a development platform, JHipster should handle the whole possible
lifecycle of an entity:
- create
- update
- rename
- remove
Because you don't always (never?) design your perfect model from
beginning, you should have the ability to rename or remove an entity
without having to do it manually (it's quite painful).
There's also a common trap: when you rename an entity in your JDL, a new
entity is created, but the old one is still here.
*Related issues or PR*
#4372 <#4372>
- Checking this box is mandatory (this is just to show you read
everything)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#8933>, or mute the
thread
<https://github.com/notifications/unsubscribe-auth/ABDlF-L1Rxto_BaC1KexWxSqRDCQj2bKks5u249TgaJpZM4ZJkRc>
.
|
Because when I create a new entity for the new name there's now way to make the link with the entity with the former name, and thus all linked entities won't be updated?
What if I want to rename |
Here my point of view. |
Since that what I've done this week (renaming entities), I can tell that it's not that simple, and it took me way more than 5min.
It's not about mistake. It's about keeping a common, rigorous language between developers and users (of the application). Defining an ubiquitous language can take time, and it can evolve during the project lifecycle.
How can you do that when there's hundred of commits after the initial entities generation? |
Here a use case:
@murdos : I'm not against, just reluctant to have this, because I think it will be hard to achieve (specially to test in our CI), then to maintain and it will probably result in a lot of issues. |
Personally, I will also be against renaming entity with JH as it will bring
a lot of maintenance overhead for us, and the only way to do it properly
would be to use a lot of regex/needles etc which is not very scalable and
is too much work. An IDE can do the job much better IMO. For deletion
I'm half minded
Thanks & Regards,
Deepu
…On Sun, Dec 9, 2018 at 12:49 PM Pascal Grimaud ***@***.***> wrote:
Here a use case:
- the user creates an application with hundred entities + SQL
- then, some dev + custom modifications
- some deployment, so apply liquibase changes
- the user needs to rename an entity (with table). Do you think he
will:
- do it manually ? (personnaly, I will choose this, helping by git
diff)
- or use this new rename sub generator ? a minor bug in this, and
the user will do the change manually (no time to wait the fix / a new
release), or he will open a new ticket without details because he can't
share his code (exactly like upgrade sub-generator)
- for both solutions, he'll need to check closely his code, manage
liquibase diff, because the rename sub-gen can't handle it
@murdos <https://github.com/murdos> : I'm not against, just reluctant to
have this, because I think it will be hard to achieve (specially to test in
our CI), then to maintain and it will probably result in a lot of issues.
But maybe I'm wrong, because I don't use JHipster as a platform, but only
to bootstrap my application.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#8933 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABDlF9MN-76-_Nzbx55nZQnu0AxxtrQHks5u3PjjgaJpZM4ZJkRc>
.
|
I agree with the comments from @pascalgrimaud @deepu105 - this is going to be a headache, and will cause many bug reports because people will expect too much from this. There are many limitations on this, and the easier way to rollback a change is just to use Git properly. I'm closing this because I don't think this should be done. |
I had worked on an entity remover some time ago : #4403. |
The branch is still there for someone to work on it. The principle is to use git in the same way the upgrade gen works. |
Please use your IDE for that. We will not be doing this as it is too much
maintenance overhead for us for very little value.
…On Fri, 12 Jul 2019, 2:58 pm Ines Gomes, ***@***.***> wrote:
@cbornet <https://github.com/cbornet> @murdos <https://github.com/murdos>
Is it possible to remove an entity ?
I would love to do that not manually:-)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8933?email_source=notifications&email_token=AAIOKFY55PQY7PZOHTQ34QLP7B5WZA5CNFSM4GJGIROKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZZVX3A#issuecomment-510876652>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIOKF5M7QRBUYBQ7SSDVTTP7B5WZANCNFSM4GJGIROA>
.
|
A tutorial how to remove an entity across Java / Angular would be great, the IDE Safe Delete refactoring just warns you about unsafe occurrences. |
@murdos Update this issues please |
@Ahrovan it’s not implemented. |
Overview of the feature request
rename-entity
would rename an existing entity and update all related entitiesremove-entity
would remove an existing entity only if no other entity is relatedMotivation for or Use Case
As a development platform, JHipster should handle the whole possible lifecycle of an entity:
Because you don't always (never?) design your perfect model from beginning, you should have the ability to rename or remove an entity without having to do it manually (it's quite painful).
There's also a common trap: when you rename an entity in your JDL, a new entity is created, but the old one is still here.
Related issues or PR
#4372
The text was updated successfully, but these errors were encountered: