Skip to content

Can you give me a hint about automatic generation? #1070

@courage0916

Description

@courage0916

Firstly, I'm sorry for not responding in a timely manner due to network issues.

I previously raised the issues of 1061,Ask why not generate templates and more models.
Jeffgbutler answered me,can read his previous blogs and list his viewpoints,I have gained something.
previous github link:#1061

However, I still have doubts。
Let me explain the usage scenarios of my program.
In the program, due to display reasons, the original data 0/1 is stored in the Po layer. However, in order to display the processed data yes/no to the user, the VO layer was born. Sometimes, the fields in the VO and Po layers are exactly the same, but most of the time, the fields in the VO layer are more than those in the Po layer. Additionally, the VO field may have fields that do not match the fields in the Po layer and require logical conversion.
The same goes for the dto 、query layer, which is a compromise made for display.
Because without detailed partitioning, users acquire too much redundant data. For example, if the user only needs to look at fields A and B, and the program also shows the C field to the user, this situation is not safe. Good program data should have permissions.
In addition, when initializing controllers and services, they are similar and can actually be extracted. Spring is doing this by opening up the Spring Data jpa and Spring Data Rest frameworks, defining a universal rest style basic plugin that can quickly develop a simple web.
However, I feel that it's not very flexible, so I used mybatis.
The usage of my project seems to be somewhere between the anemia model and the rich domain model.
I want the flexibility and simplicity of MyBatis, and I also want to enrich the basic transformation capabilities of models to cope with the transformation of different models. I need the concise and accurate presentation of different models, and I don't want to write too much code that focuses on models because it doesn't make much sense.

So, I need to use mybatis gen.
Mybatis gen simplifies the pressure on program po and jdbc layers,I also want mybatis gen to simplify the pressure on the vo, query, dto, service, and controller layers.
I am using mybatis dynamic SQL, and after a period of use, I have felt the charm of mybatis dynamic SQL
When I was using mybatis gen to generate code, I couldn't find an open interface to generate the mybatis dynamic SQL model.
Therefore, I would like to ask again in the hope of seeking help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions