Skip to content
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

Missing calls Java Spring Boot repositories #183

Open
pfrollo opened this issue Dec 12, 2024 · 1 comment
Open

Missing calls Java Spring Boot repositories #183

pfrollo opened this issue Dec 12, 2024 · 1 comment

Comments

@pfrollo
Copy link

pfrollo commented Dec 12, 2024

Describe the bug

When a method calls a save() method of a repository that implements the CrudRepository interface, then the diagram only shows the call to the CrudRepository interface.
The fact that the repository is involved in the call is hidden.

This is a major flaw. We need to know what repositories are in the flow. It does not help us to see calls to the interface the repositories implement.

To Reproduce

  • Create a component class that autowires a repository that implements CrudRepository
  • Add a method that calls the save method from the repository
  • Display the sequence diagram
  • Notice that the repository is missing in the diagram

Expected behavior

  • Repositories should be rendered and while Display only project classes option is OFF. Having it ON pollutes diagrams.

Screenshots
Screenshot 2024-12-12 at 11 53 01 AM

Plugin & IDE info:

  • Plugin Version [e.g. 2.2.0] 4.0.3
  • IDE Name & Version [e.g. IDEA Comunity 2022.2] IntelliJ IDEA 2024.3.1 RC (Ultimate Edition)
  • Which language (e.g: Java, Kotlin, Scala, Groovy) you try to generate? Java
@Vanco
Copy link
Owner

Vanco commented Jan 5, 2025

There's a basic generate rule: the code logic inside your project is generated primarily and the outer classes don't go deeper.

A project's code can be divided into code that is internal to the project and code that is referenced externally. Externally referenced code is marked in red in the diagram. The generated sequence diagram is mainly based on the code in the project, supplemented by the code outside the project:
rule 1. The internal project code calls the internal project method will be generated.
rule 2. The code within the project calls the externally referenced method will be generated.
rule 3. Code outside the project calls external code and is not generated.

Display only project classes:
ON- Indicates that only rule 1 is generated
OFF- Shows rule 1 and rule 2

In your code, CrudRepository is an external interface. the call 1.16.17: save from ComponentStateManager, generate base on rule 2, but the datail in side of save is on rule 3, is not generated.

how to hack:
You can double click save method bar. onpen the code of CrudRepository editor. generate save method from there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants