Skip to content

Commit 99eb396

Browse files
authored
Fix/entity command (jhipster#1563)
* Fix entity command and update to jhipster 8.9
1 parent ec32e96 commit 99eb396

File tree

6 files changed

+366
-595
lines changed

6 files changed

+366
-595
lines changed

.yo-rc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
},
147147
"githubRepository": "jhipster/jhipster-dotnetcore",
148148
"githubWorkflows": true,
149-
"jhipsterVersion": "8.8.0",
149+
"jhipsterVersion": "8.9.0",
150150
"js": true,
151151
"localBlueprint": false,
152152
"packageJsonType": "module",

generators/bootstrap-application/__snapshots__/generator.spec.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ exports[`SubGenerator bootstrap-application of dotnetcore JHipster blueprint > r
5050
"clientBundler": "webpack",
5151
"clientBundlerAny": true,
5252
"clientBundlerExperimentalEsbuild": false,
53+
"clientBundlerName": undefined,
5354
"clientBundlerVite": false,
5455
"clientBundlerWebpack": true,
5556
"clientDistDir": "src/Jhipster/ClientApp/dist/",
@@ -65,6 +66,8 @@ exports[`SubGenerator bootstrap-application of dotnetcore JHipster blueprint > r
6566
"clientRootDir": "src/Jhipster/ClientApp/",
6667
"clientSrcDir": "src/Jhipster/ClientApp/src/",
6768
"clientTestDir": "src/Jhipster/ClientApp/test/",
69+
"clientTestFramework": undefined,
70+
"clientTestFrameworkName": undefined,
6871
"clientTestFrameworks": undefined,
6972
"clientTestFrameworksAny": false,
7073
"clientTestFrameworksCypress": false,

generators/entity/command.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { asCommand } from 'generator-jhipster';
2+
import { command as entityCommand } from 'generator-jhipster/generators/entity';
23

34
export default asCommand({
4-
options: {},
5+
...entityCommand,
56
});

generators/entity/generator.js

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export default class extends EntityGenerator {
1717

1818
get [EntityGenerator.INITIALIZING]() {
1919
return this.asInitializingTaskGroup({
20-
...super.initializing,
2120
async initializingTemplateTask() {
2221
this.parseJHipsterArguments(command.arguments);
2322
this.parseJHipsterOptions(command.options);
2423
},
24+
...super.initializing,
2525
});
2626
}
2727

@@ -72,6 +72,17 @@ export default class extends EntityGenerator {
7272
askForDTO: prompts.askForDTO,
7373
// askForFiltering: prompts.askForFiltering,
7474
askForPagination: prompts.askForPagination,
75+
76+
async composeEntities() {
77+
// We need to compose with others entities to update relationships.
78+
await this.composeWithJHipster('jhipster:entities', {
79+
generatorArgs: this.options.singleEntity ? [this.entityData.name] : [],
80+
generatorOptions: {
81+
skipDbChangelog: this.options.skipDbChangelog,
82+
skipInstall: this.options.skipInstall,
83+
},
84+
});
85+
},
7586
});
7687
}
7788

@@ -141,7 +152,6 @@ export default class extends EntityGenerator {
141152
get [EntityGenerator.POST_WRITING]() {
142153
return this.asPostWritingTaskGroup({
143154
...super.postWriting,
144-
async postWritingTemplateTask() {},
145155
});
146156
}
147157

0 commit comments

Comments
 (0)