-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Task
Implement the ?include= query parameter for eager loading in Kotlin/Exposed.
Endpoints
GET /buildingswith?include=roomsor?include=rooms.lampsGET /buildings/{id}with?include=rooms.lampsGET /buildings/{id}/roomswith?include=lampsGET /rooms/{id}with?include=lamps,building
Functional Requirement
Must minimize database queries regardless of the number of entities returned.
Implementation Hints
- Use Exposed's
leftJoinwith manual result mapping - Or use
load()withwith()for eager loading references - Parse the
includeparameter and build dynamic queries
Acceptance Criteria
-
?include=roomsreturns buildings with nested rooms -
?include=rooms.lampsreturns buildings with rooms and lamps - Query count does not increase with number of buildings (verify with SQL logging)
Parent Issue
Relates to #289
Reactions are currently unavailable