Dear All,
I have one question i may call that as confusion which means that iam not clear on this concept.
I came across an article which was explaining Lazy Loading of Objects.
Here it is.
Consider below is the object graph
-A
|
*---B
| |
| *---C
| |
| *---D
| |
| *---E
| |
| *---F
| |
| *---G
*---H
It said if i want to load object 'C', all Parent and Child need to be loaded.
ie.,
Quote:
If you were to ask a naive O/R mapper to load C, it would have to load B (due to the parent reference). To load B, the O/R mapper then has to load D (due to the children reference). D then has to load E, F, and G. Then, to continue loading B, the O/R mapper has to load A, which then loads H.
For me it makes sense if it is enough just to load all the required Children as the associated(child) object should not be null.
Why the parent object need to be loaded?
Can any one explain me this?
Also please let me know if this concept is applicable in general or specific to HIBERNATE?
Thanks.
Regards
Senthil Kumar Sekar