'What is the difference between FETCH and LOAD for Entity graph of JPA?

I'm new to JPA and I'm trying to use entity graph. And I realized when I retrieve data, I need to specify which EntityGraphType I want to use.

I read JPA2.1 specification but I'm still not sure how can I use these 2 options properly...

the question is...

  • which option should I use if I don't have any specific reqirement?
  • what is the specific situation when I need to use Fetch and Load?


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source