Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_017ic4b4VQVEJWetTT1dYzyJ
7 lines
400 B
Plaintext
7 lines
400 B
Plaintext
findAll() on Customer returns rows only. There is no orders field to be lazy or eager:
|
|
Customer[id=1, name=A, [email protected], tier=STANDARD]
|
|
1+N queries (4 SQL statements for 3 customers) -> [A:2, B:1, C:0]
|
|
two queries (2 SQL statements) -> [A:2, B:1, C:0]
|
|
one LEFT JOIN, grouped by hand (1 statement) -> [A:2, B:1, C:0]
|
|
all three strategies return identical aggregates: true
|