What are the types of cascade supported by JPA?

Answer

Following is the list of cascade type: -

  • PERSIST: In this cascade operation, if the parent entity is persisted then all its related entity will also be persisted.
  • MERGE: In this cascade operation, if the parent entity is merged, then all its related entity will also be merged.
  • DETACH: In this cascade operation, if the parent entity is detached, then all its related entity will also be detached.
  • REFRESH: In this cascade operation, if the parent entity is refreshed, then all its related entity will also be refreshed.
  • REMOVE: In this cascade operation, if the parent entity is removed, then all its related entity will also be removed.
  • ALL In this case, all the above cascade operations can be applied to the entities related to the parent entity.

All jpa Questions

Ask your interview questions on jpa

Write Your comment or Questions if you want the answers on jpa from jpa Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---