[DAO] Support different query options for internal/external usage

Description

Given I want to query a database object

Given that object has many related objects (relationship)

Scenario 1:

When I query that object (by default all relationships are lazyloaded)

Then my query is slow

Scenario 2:

When I query that object by preloading all relationships (eagerloading)

If I only want to associate a relationship, then my query is slow because fetching unneeded related objects is too long

 

TLDR:

lazy / eager loading of related objects is dependent of use-case and can’t be enforced for all scenarios without a penalty, since DAO is used equally for external operations (APIs) and internal usage (object association)

Zendesk Ticket IDs

None

Activity

Show:
Done

Details

Priority

Assignee

Reporter

Fix versions

Sprint

Zendesk Support

Created July 11, 2023 at 7:33 PM
Updated August 9, 2023 at 3:15 PM
Resolved August 4, 2023 at 3:35 PM