Skip to content

generate a single entity will affect other non-related entites #28747

Closed as not planned
@flyliu33

Description

@flyliu33
Overview of the issue
Motivation for or Use Case

As project grows up, custom codes, aka business code will be huge difference comparing the original codes generated by jhipster and maintaining jdl file will be our daily job. What does we want is maintaining the jdl file and try not to make a negative impact on our custom code. However, if I maintain a single entity on a jdl file and use command either jdl or entity, it will affect other non-related code, make us have to solve the conflict and increase our maintenance cost.

Reproduce the error

Problem with command entity

  1. Create and enter into a new folder and execute command git init.

  2. Generate project by command jhipster jdl .\ms-ecommerce-store.jdl --auto-crlf with jdl file ms-ecommerce-store-original.txt

  3. Modify some code base based on existing entities. Commit or not.

    • in store gateway service: SysViewPermissionRepository, SysViewPermissionRepositoryInternalImpl, SysViewPermissionResource, SysViewPermissionService, sys-view-permisson-details
    • in product microservice: OrderItemSearchRepository, OrderItemService, OrderItemResource, order-item.vue .
  4. Execute command jhipster jdl .\ms-ecommerce-store.jdl --auto-crlf --json-only with a modified jdl file ms-ecommerce-store-modified.txt

  5. Enter into store folder and execute command jhipster entity Test1 --auto-crlf and select "Yes, re generate the entity"

  6. It would find the SysViewPermissoin related codes were overwritten also.

  7. Enter into product folder and execute command jhipster entity Test2 --auto-crlf and select "regenerate"

  8. the OrderItem related codes were overwritten also.

Problem with command jdl

  1. Create and enter into a new folder and execute command git init.

  2. Generate project by command jhipster jdl .\ms-ecommerce-store.jdl --auto-crlf with jdl file ms-ecommerce-store-original.txt

  3. Modify some code base based on existing entities. Commit or not.

    • in store gateway service: SysViewPermissionRepository, SysViewPermissionRepositoryInternalImpl, SysViewPermissionResource, SysViewPermissionService, sys-view-permisson-details
    • in product microservice: OrderItemSearchRepository, OrderItemService, OrderItemResource, order-item.vue .
  4. Execute command jhipster jdl .\ms-ecommerce-store.jdl --auto-crlf with a modified jdl file ms-ecommerce-store-modified.txt

  5. The progress will be stuck and cannot more forward with any button. If hitting any button, it would appear tribble characters.

Image

Related issues
Suggest a Fix
JHipster Version(s)

v8.7.3

Browsers and Operating System

Edition Windows 11 Pro
Version 24H2
Installed on ‎11/‎22/‎2024
OS build 26100.2894
Experience Windows Feature Experience Pack 1000.26100.36.0

  • Tickets opened without reproduction steps or that doesn't follows the template recommendation will be closed.
  • This issue is prompt-related or an error that prevents JHipster from generating an application.
  • I don't have a JDL otherwise I should open an JDL Issue
  • The application is not successfully generated otherwise, I should open an Issue with jhipster info
  • Checking this box is mandatory (this is just to show you read everything)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions