When dealing with relationships in Spring Data JPA, the _____ annotation can be used to handle cascading operations between entities.

  • @Cascade
  • @CascadeOperation
  • @OneToMany
  • @Relationship
When dealing with relationships in Spring Data JPA, you can use the @Cascade annotation to handle cascading operations between entities. This annotation allows you to specify how related entities should be affected when changes occur in the parent entity. For example, you can use @Cascade to specify that when you delete a parent entity, its associated child entities should also be deleted, ensuring referential integrity.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *