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 cyclic entities in neo4j sample #26539

Merged
merged 6 commits into from
Jun 25, 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
8 changes: 7 additions & 1 deletion .blueprint/from-issue/generator.mts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,13 @@ export default class extends BaseGenerator {
envOptions,
);
} else if (jdlDefinitions) {
await EnvironmentBuilder.run([`jhipster:${GENERATOR_JDL}`], { ...generatorOptions, inline: jdlDefinitions }, envOptions);
const applications = (jdlDefinitions.match(/application\s*\{/g) || []).length;
const workspaceOpts = applications > 1 ? { workspaces: true, monorepository: true } : {};
await EnvironmentBuilder.run(
[`jhipster:${GENERATOR_JDL}`],
{ ...generatorOptions, ...workspaceOpts, inline: jdlDefinitions },
envOptions,
);
}
setGithubTaskOutput(RESULT_OUTPUT, SUCCESS);

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/linked-issue-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ jobs:
env:
# generate-sample uses JHI_FOLDER_APP to generate the application.
JHI_FOLDER_APP: ${{ github.workspace }}/app
JHIPSTER_DEPENDENCIES_VERSION: 0.0.0-CICD
- run: jhipster.cjs info
if: steps.project.outputs.contains-sample != 'false'
#----------------------------------------------------------------------
Expand Down
5 changes: 2 additions & 3 deletions generators/spring-data-neo4j/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

import BaseApplicationGenerator from '../base-application/index.js';
import { GENERATOR_JAVA, GENERATOR_LIQUIBASE } from '../generator-list.js';
import { GENERATOR_LIQUIBASE } from '../generator-list.js';
import writeTask from './files.js';
import cleanupTask from './cleanup.js';
import writeEntitiesTask, { cleanupEntitiesTask } from './entity-files.js';
Expand All @@ -31,8 +31,7 @@ export default class Neo4jGenerator extends BaseApplicationGenerator {

if (!this.delegateToBlueprint) {
await this.dependsOnBootstrapApplication();
const javaGenerator: any = await this.dependsOnJHipster(GENERATOR_JAVA);
javaGenerator.useJacksonIdentityInfo = true;
((await this.dependsOnJHipster('jhipster:java:domain')) as any).useJacksonIdentityInfo = true;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ application {

@ChangelogDate(20210408164809)
entity UserData {
address String
address String required
}

@ChangelogDate(20210408164810)
Expand Down Expand Up @@ -142,7 +142,7 @@ entity Notification {
}

relationship ManyToOne {
Post{blog(name)} to Blog
Post{blog(name) required} to Blog{posts}
}

relationship ManyToMany {
Expand All @@ -154,7 +154,6 @@ paginate Product with pagination

service Product with serviceClass
service Notification with serviceImpl
dto Blog, Post, Tag, Notification with mapstruct

microservice Product with store

Expand Down
Loading