Closed rhobolic closed 2 years ago
@rhobolic thanks for reporting.
IMHO in this case, actually the rule is correct. A lower layer may not depend on code from upper layers.
So actually the SearchCriteriaTo
has to be generated in dataaccess
since it is required and defined here as representation for the query.
A next problem could then be that the service
layer will then directly depend on dataaccess
bypassing the logic
layer.
This is then a matter of the strictness of a layered architecture.
It is interesting that you seem to be the first one to notice this problem and nobody ever found this before.
My suggestion is still to change the CobiGen Templates but this one might be a little tricky and could cause some time to get resolved properly.
I created this issue in CobiGen https://github.com/devonfw/cobigen/issues/1548 and hence close this issue as sonar-devon4j-plugin
behaves correct here.
Problem When I generate the code in Cobigen and then it passes SonarQube the devon for layer violation is hit. It is importing the *SearchCriteriaTo.java in the Repository
Expected behavior There is no layer violation caused by Cobigen generated code at all