"history" on a relationship-bound attribute will now no longer emit
any SQL if the relationship is unloaded.
.. changelog::
:version: 0.9.2
+ .. change::
+ :tags: bug, examples
+
+ Added a tweak to the "history_meta" example where the check for
+ "history" on a relationship-bound attribute will now no longer emit
+ any SQL if the relationship is unloaded.
+
.. change::
:tags: feature, sql
# check those too
for prop in obj_mapper.iterate_properties:
if isinstance(prop, RelationshipProperty) and \
- attributes.get_history(obj, prop.key).has_changes():
+ attributes.get_history(obj, prop.key,
+ passive=attributes.PASSIVE_NO_INITIALIZE).has_changes():
for p in prop.local_columns:
if p.foreign_keys:
obj_changed = True