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)
| 1230 | |
| 1231 | @_generative |
| 1232 | def populate_existing(self) -> Self: |
| 1233 | """Return a :class:`_query.Query` |
| 1234 | that will expire and refresh all instances |
| 1235 | as they are loaded, or reused from the current :class:`.Session`. |
| 1236 | |
| 1237 | As of SQLAlchemy 1.4, the :meth:`_orm.Query.populate_existing` method |
| 1238 | is equivalent to using the ``populate_existing`` execution option at |
| 1239 | the ORM level. See the section :ref:`orm_queryguide_populate_existing` |
| 1240 | for further background on this option. |
| 1241 | |
| 1242 | """ |
| 1243 | self.load_options += {"_populate_existing": True} |
| 1244 | return self |
| 1245 | |
| 1246 | @_generative |
| 1247 | def _with_invoke_all_eagers(self, value: bool) -> Self: |
no outgoing calls