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 bidirectional/unidirectional question #26099

Merged
merged 2 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 2 additions & 12 deletions generators/entity/generator.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,16 +210,6 @@ export default class EntityGenerator extends BaseApplicationGenerator {
askForFiltering: prompts.askForFiltering,
askForReadOnly: prompts.askForReadOnly,
askForPagination: prompts.askForPagination,
});
}

get [BaseApplicationGenerator.POST_PREPARING]() {
return this.delegateTasksToBlueprint(() => this.postPreparing);
}

// Public API method used by the getter and also by Blueprints
get default() {
return this.asDefaultTaskGroup({
async composeEntities() {
// We need to compose with others entities to update relationships.
await this.composeWithJHipster(GENERATOR_ENTITIES, {
Expand All @@ -233,8 +223,8 @@ export default class EntityGenerator extends BaseApplicationGenerator {
});
}

get [BaseApplicationGenerator.DEFAULT]() {
return this.delegateTasksToBlueprint(() => this.default);
get [BaseApplicationGenerator.POST_PREPARING]() {
return this.delegateTasksToBlueprint(() => this.postPreparing);
}

// Public API method used by the getter and also by Blueprints
Expand Down
2 changes: 1 addition & 1 deletion generators/entity/prompts.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ async function askForRelationship(...args) {

return true;
},
type: 'input',
type: 'confirm',
name: 'bidirectional',
message: 'Do you want to generate a bidirectional relationship',
default: true,
Expand Down
Loading