Thursday 19 January 2017

What do you mean by fetching strategy?

fetching strategy is the strategy Hibernate will use for retrieving associated objects if the application needs to navigate the association.

There are four fetching strategies
1. fetch-”join” = Disable the lazy loading, always load all the collections and entities.
2. fetch-”select” (default) = Lazy load all the collections and entities.
3. batch-size=”N” = Fetching up to ‘N’ collections or entities, *Not record*.
4. fetch-”subselect” = Group its collection into a sub select statement.

No comments:

Post a Comment