Indicate that the given relationship attribute should remain unloaded. The relationship attribute will return ``None`` when accessed without producing any loading effect. :func:`_orm.noload` applies to :func:`_orm.relationship` attributes only. .. s
(self, attr: _AttrType)
| 490 | "items.", |
| 491 | ) |
| 492 | def noload(self, attr: _AttrType) -> Self: |
| 493 | """Indicate that the given relationship attribute should remain |
| 494 | unloaded. |
| 495 | |
| 496 | The relationship attribute will return ``None`` when accessed without |
| 497 | producing any loading effect. |
| 498 | |
| 499 | :func:`_orm.noload` applies to :func:`_orm.relationship` attributes |
| 500 | only. |
| 501 | |
| 502 | .. seealso:: |
| 503 | |
| 504 | :ref:`loading_toplevel` |
| 505 | |
| 506 | """ |
| 507 | |
| 508 | return self._set_relationship_strategy(attr, {"lazy": "noload"}) |
| 509 | |
| 510 | def raiseload(self, attr: _AttrType, sql_only: bool = False) -> Self: |
| 511 | """Indicate that the given attribute should raise an error if accessed. |