jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.5k stars 4.02k forks source link

neo4j+vue+jdl, relationship Deleted by error in some case #21061

Closed liseri closed 1 year ago

liseri commented 1 year ago

Hi, neo4j+vue+jdl(default sample in jdl-studio), in chrome page, when I add a 'Job' with one Employee, the relationship between Department and Location will be delete, which is wrong, as the pic: 1675833018136_FBC1B85D-4DDE-4ed8-B657-19EC11748BBD

my .yo-rc.json

{
  "generator-jhipster": {
    "applicationType": "monolith",
    "authenticationType": "jwt",
    "baseName": "jhtest1",
    "blueprints": [],
    "buildTool": "maven",
    "cacheProvider": "caffeine",
    "clientFramework": "vue",
    "clientPackageManager": "npm",
    "clientTheme": "cosmo",
    "clientThemeVariant": "primary",
    "creationTimestamp": 1675653774718,
    "cypressAudit": true,
    "cypressCoverage": null,
    "databaseType": "neo4j",
    "devDatabaseType": "neo4j",
    "devServerPort": 9060,
    "dtoSuffix": "DTO",
    "enableGradleEnterprise": false,
    "enableHibernateCache": false,
    "enableSwaggerCodegen": false,
    "enableTranslation": true,
    "entities": ["Region", "Country", "Location", "Department", "Task", "Employee", "Job", "JobHistory"],
    "entitySuffix": "",
    "jhiPrefix": "jhi",
    "jhipsterVersion": "7.9.3",
    "jwtSecretKey": "xx",
    "languages": ["zh-cn", "en"],
    "lastLiquibaseTimestamp": 1675831020000,
    "messageBroker": false,
    "microfrontend": false,
    "microfrontends": [],
    "nativeLanguage": "zh-cn",
    "otherModules": [],
    "packageName": "com.mycompany.myapp",
    "pages": [],
    "prodDatabaseType": "neo4j",
    "reactive": false,
    "searchEngine": false,
    "serverPort": "8080",
    "serverSideOptions": [],
    "serviceDiscoveryType": "no",
    "skipCheckLengthOfIdentifier": false,
    "skipClient": false,
    "skipFakeData": false,
    "skipUserManagement": false,
    "testFrameworks": ["cypress"],
    "websocket": false,
    "withAdminUi": true
  }
}
atomfrede commented 1 year ago

I think this is a know issue due to how neo4j spring data works (how is the job related to the department?)

liseri commented 1 year ago

I think this is a know issue due to how neo4j spring data works (how is the job related to the department?)

when I align a emplyee to a job, the relationship between Department and Location was eliminated。 That is a Wrong function. In Job.java, as below: as the ignoreproperties, employee is not Incomplete。so, save incomplete employee when save job, to cause some infos eliminated.

@Relationship(value = "HAS_JOB", direction = Relationship.Direction.INCOMING)
@JsonIgnoreProperties(value = { "jobs", "manager", "department" }, allowSetters = true)
private Employee employee;
github-actions[bot] commented 1 year ago

This issue is stale because it has been open for too long without any activity. Due to the moving nature of jhipster generated application, bugs can become invalid. If this issue still applies please comment otherwise it will be closed in 7 days