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

fix: fix path of the file output from the tool #1092

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

k-takeuchi220
Copy link

  • Do only one thing
  • Non breaking API changes
  • Tested WIP

What did this pull request do?

Due to the following problems, we have changed the output destination of the files.

Problem 1

When specified as follows, the model file is created in ./src/model:
What I expect is for the model file to be created in ./src/domain/model:

gentool -dsn "" -onlyModel -outPath "src/domain"

Problem 2

Using the modelPkgName option also exhibits strange behavior when specifying a string containing a path separator.
In this case, since outPath is not specified, it is expected that the model files would be generated in dto/model/src/domain, but in reality, they are created in ./src/domain.

gentool -dsn "" -onlyModel -modelPkgName "src/domain"
Current behavior

If modelPkgName does not contain a path separator, output the model files to outPath + modelPkgName.
If modelPkgName contains a path separator, output the model files to the path specified in modelPkgName.

Problem 3

The outputPath specifies the location of the query folder, and the location of the model file is determined accordingly.
However, from a naming perspective, I think this is confusing and not a suitable behavior.

User Case Description

Behavior after modification

I have added an option called queryPkgName. The destination for generating query files will be outPath + queryPkgName. This applies similarly if queryPkgName contains a path separator.

Likewise, the destination for generating model files will be outPath + modelPkgName. This also applies similarly if modelPkgName contains a path separator.

There is no change in default behavior if no output destination is specified. However, it is important to note that if the outPath option and modelPkgName option are specified and used, the generated results may differ.

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

Successfully merging this pull request may close these issues.

1 participant