Return a :class:`_query.Query` that will expire and refresh all instances as they are loaded, or reused from the current :class:`.Session`. As of SQLAlchemy 1.4, the :meth:`_orm.Query.populate_existing` method is equivalent to using the ``populate_existing`` executio
(self)
| 1218 | |
| 1219 | @_generative |
| 1220 | def populate_existing(self) -> Self: |
| 1221 | """Return a :class:`_query.Query` |
| 1222 | that will expire and refresh all instances |
| 1223 | as they are loaded, or reused from the current :class:`.Session`. |
| 1224 | |
| 1225 | As of SQLAlchemy 1.4, the :meth:`_orm.Query.populate_existing` method |
| 1226 | is equivalent to using the ``populate_existing`` execution option at |
| 1227 | the ORM level. See the section :ref:`orm_queryguide_populate_existing` |
| 1228 | for further background on this option. |
| 1229 | |
| 1230 | """ |
| 1231 | self.load_options += {"_populate_existing": True} |
| 1232 | return self |
| 1233 | |
| 1234 | @_generative |
| 1235 | def _with_invoke_all_eagers(self, value: bool) -> Self: |
no outgoing calls