The problem relates to retrieving data from tables that have a one to many relationship. Basically, the "n + 1" relates to the number of sql queries that need to be run to fully hydrate all the objects.
For instance, you have two tables: orders & orderlines. For some order, you have 10 order lines. Since Hibernate tries to load the least amount of data possible, with certain fetching strategies, you could end up issuing 11 queries to the database.
I'm not going to go into dealing with this -- there is a lot of information on that topic. But I will say that this behavior is not always bad -- it depends on your use case.
Curtis ...
_________________ ---- Don't forget to rate! ----
|