How does EclipseLink detect first access to make lazy fetching?

Viewed 198

Could anyone explain how EclipseLink detects the first access to field to make lazy fetching? It seems there is some magic and I can't find a way how it is done.

If I understand it right for @OneToMany relation EclipseLink creates intance of org.eclipse.persistence.indirection.IndirectList which controls the access. But I can't understand what EclipseLink does for @ManyToOne relation.

1 Answers
Related