Hibernate / EclipseLink Interview questions
What is class weaving in EclipseLink?
Weaving is a bytecode-enhancement step EclipseLink applies to entity classes, injecting extra fields and methods that support features standard plain Java classes can't provide on their own: transparent lazy loading of relationships, efficient attribute-level change tracking, and fetch-group-aware partial object loading.
Without weaving, EclipseLink falls back to less efficient strategies, like eagerly resolving lazy relationships immediately or comparing entire object state to detect changes (deferred change detection) instead of tracking exactly which fields changed. Weaving is what lets a @OneToMany collection stay unresolved until actually accessed, backed by an EclipseLink-managed indirection object instead of the real collection.
More Related questions...