GithubHelp home page GithubHelp logo

Comments (4)

OmarHawk avatar OmarHawk commented on May 27, 2024
Suggest a Fix

In the Parent entity, add the following configuration

cascade = CascadeType.REMOVE, orphanRemoval = true

to

@OneToOne(fetch = FetchType.LAZY, mappedBy = "parent")

"normally" the @onDelete is something that's happening on database level. I wonder, why it isn't the case in this special situation.

from generator-jhipster.

github-actions avatar github-actions commented on May 27, 2024

JHipster has completed the sample check
.yo-rc.json:
Entities JDL:
Application: successfully generated
Frontend check: skipped
Backend check: skipped
E2E check: skipped

This check uses jhipster info output from the issue description to generate the sample.
Bug report that does not contain this information will be marked as invalid.

from generator-jhipster.

vw98075 avatar vw98075 commented on May 27, 2024

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.

from generator-jhipster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.