Skip to content

Commit 2ae6e69

Browse files
committed
Fix entity command and update to jhipster 8.9
1 parent b56389d commit 2ae6e69

File tree

4 files changed

+18
-7
lines changed

4 files changed

+18
-7
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/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: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ export default class extends EntityGenerator {
1616
}
1717

1818
get [EntityGenerator.INITIALIZING]() {
19-
return this.asInitializingTaskGroup({
20-
...super.initializing,
19+
return this.asInitializingTaskGroup({
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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
},
4747
"dependencies": {
4848
"chalk": "^5.3.0",
49-
"generator-jhipster": "8.8.0",
49+
"generator-jhipster": "8.9.0",
5050
"js-guid": "^1.0.2",
5151
"pluralize": "^8.0.0",
5252
"to-pascal-case": "^1.0.0"
@@ -63,7 +63,7 @@
6363
"yeoman-test": ">=8.2.0"
6464
},
6565
"engines": {
66-
"generator-jhipster": "8.8.0",
66+
"generator-jhipster": "8.9.0",
6767
"node": "^18.19.0 || >= 20.6.1"
6868
}
6969
}

0 commit comments

Comments
 (0)