Problem:
I need to find out which database entities (and fields of those entities) are used by a certain Gradle module (which has multiple dependencies to other modules which contain those entities). I need to do this because some entities in the database are going to be moved to a different place and I need to find out if this is an issue for the respective module.
The question would be:
Will the module still be executable after I removed those entities from the database?
The seemingly easy solution:
Why don't I just run through the code of the module (and the modules it depends on) and find the entities?
Because the modules are huge and there are multiple hundred entities which might be used.
What did I try so far?
- I started with an entity relationship diagram but this does not tell me which pieces of the code are using the entities.
- Next, I ran some static code analyis (Analyze dependencies...) using IntelliJ which returns a huge list of used classes (~1.000) in other modules but I would need to manually open them all to find out if it's an entity. On top, the analysis does not tell me which of this entity's attributes is used.
What do I expect?
I want a list of entity attributes which are needed to be present in the databse so that the module can still be executed.