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.