You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I choose an Entity in OASP and regenerate Implementation then the component facade (e.g. TableManagement) gets merged and the extends statements to the usecase interfaces get duplicated causing a compile error.
Before:
public interface Tablemanagement extends UcFindTable, UcManageTable {
After:
public interface Tablemanagement extends UcFindTable, UcManageTable, UcFindTable, UcManageTable {
template: DataManagement.ftl
The text was updated successfully, but these errors were encountered:
The problem was because of wrong imports of the usecases within the DataManagment.ftl template. Thus the merger compared e.g. two classes of UcManagTable:
Due to organize imports the first will be corrected after initial generation of such a dependency. The next time the merger will compare the patch and the base, which will now declare two different imports.
_Open discussion:_
You might argue that this it is a bug as it should be possible to inherit both classes. I would see that as minor improvement as it can be also argued to be a bad design and to occurr with a low probability. :) So costs vs. benefits currently would go for deferring this.
Second thing to be mentioned is, that the import declarations might be seen as not necessary. This is true as far as all dependencies--your generated code depends on--exist before generating the new contents. Otherwise, I observed that "organize imports" is not able to resolve dependencies between newly generated Java classes. Maybe because of a missing compile step between generation and calling "organize imports". If we can manage to get this working, this might help us a lot during maintaining the templates over time, but this will need further investigation. I would go for a new issue (Enable organize imports for dependencies between generated contents #59) about that.
When I choose an Entity in OASP and regenerate
Implementation
then the component facade (e.g.TableManagement
) gets merged and the extends statements to the usecase interfaces get duplicated causing a compile error.Before:
After:
template: DataManagement.ftl
The text was updated successfully, but these errors were encountered: