Skip to content

Tables do not automatically prefetch reverse one-to-one relations #17124

Closed
@jeremystretch

Description

@jeremystretch

Deployment Type

NetBox Cloud

NetBox Version

v4.0.8

Python Version

3.10

Steps to Reproduce

  1. Create a device with five module bays
  2. Install a module into each bay
  3. View the device's module bays list

Expected Behavior

The installed modules should be prefetched automatically to optimize the number of database queries.

Observed Behavior

A separate query is issued for each installed module. This is because the base table's prefetch logic does not recognize reverse one-to-one relations.

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions