-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Deleting a Parent isn't working when it has a Child in a one-to-one relationship #25797
Comments
"normally" the |
JHipster has completed the sample check This check uses |
For the User one-to-one case, the annotation @onDelete("CASCADE") initiates a cascade operation within the DB schema. This approach, while functional, is somewhat of a workaround, likely stemming from the "immutable" constraint of the built-in entity User, rather than the standard procedure for cascade operations in JPA/Hibernate. If this annotation serves solely as a workaround, it should be clearly documented as such. In the context of open source collaboration, it's essential to respect the design and functionality of dependent projects. While it's acceptable to propose changes or improvements, directly altering the behavior of another open-source project is generally discouraged. |
how to use orphanRemoval, dont work when add to
|
This issue is stale because it has been open for too long without any activity. |
Overview of the issue
With the following relationship definition,
, deleting a Parent with a Child in the admin UI isn't working: a pop-up panel confirms the deletion, but the data entry is still on the refreshed list. A similar JDL for the built-in User entity works, however.
There is a related issue, the parent column is blank while parent data shows up in both view and edit pages.
Motivation for or Use Case
That is a basic entity data operation.
Reproduce the error
With the provided JDL, this bug can be reproduced.
Related issues
Suggest a Fix
In the Parent entity, add the following configuration
to
JHipster Version(s)
8.3
JHipster configuration
{
"generator-jhipster": {
"applicationType": "monolith",
"authenticationType": "jwt",
"baseName": "oto",
"buildTool": "gradle",
"cacheProvider": "caffeine",
"clientFramework": "vue",
"clientTestFrameworks": [],
"clientTheme": "none",
"creationTimestamp": 1712685614957,
"databaseType": "sql",
"devDatabaseType": "h2Memory",
"devServerPort": 9060,
"enableGradleEnterprise": false,
"enableHibernateCache": false,
"enableSwaggerCodegen": false,
"enableTranslation": false,
"entities": ["Address", "Parent", "Child"],
"feignClient": null,
"gradleEnterpriseHost": null,
"jhipsterVersion": "8.3.0",
"jwtSecretKey": "...",
"lastLiquibaseTimestamp": 1712686072000,
"messageBroker": false,
"microfrontend": null,
"microfrontends": [],
"nativeLanguage": "en",
"packageName": "com.mycompany.myapp",
"prodDatabaseType": "postgresql",
"reactive": false,
"searchEngine": false,
"serverPort": null,
"serverSideOptions": [],
"serviceDiscoveryType": false,
"syncUserWithIdp": null,
"testFrameworks": [],
"websocket": false,
"withAdminUi": true
}
}
The text was updated successfully, but these errors were encountered: