mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
[PR #1569] Add EAGER_BATCHED fetchmode to OneToMany association #9628
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Original Pull Request: https://github.com/doctrine/orm/pull/1569
State: closed
Merged: No
In regular EAGER mode, doctrine adds a JOIN for a OneToMany association
forcing the database to load more data in memory than essentially
needed. In a classic Article => Tag concept, each article would be
loaded one extra time for every addition tag.
LAZY mode issues a query for every article to load all associated tags,
also adding more overhead to the database than needed.
This new fetchmode addreses this issue by loading all tags associated to
an article into one additional query.