django-bulk-hooks 0.2.68__py3-none-any.whl → 0.2.69__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of django-bulk-hooks might be problematic. Click here for more details.

@@ -938,6 +938,18 @@ class BulkOperationCoordinator:
938
938
  except Exception as e:
939
939
  logger.warning(f" ❌ Failed to extract @select_related from {handler_cls.__name__}.{method_name}: {e}")
940
940
 
941
+ # AGGRESSIVE APPROACH: Also preload ALL relationship fields on the model
942
+ # This prevents N+1 queries from any relationship access during hook execution
943
+ try:
944
+ for field in self.model_cls._meta.get_fields():
945
+ if field.is_relation and not field.many_to_many and not field.one_to_many:
946
+ # This is a forward foreign key relationship
947
+ field_name = field.name
948
+ logger.info(f" 🔗 AUTO: Adding all relationship fields including {field_name}")
949
+ relationships.add(field_name)
950
+ except Exception as e:
951
+ logger.warning(f" ❌ Failed to extract all relationship fields: {e}")
952
+
941
953
  logger.info(f"🔗 BULK PRELOAD: Total extracted relationships for {self.model_cls.__name__}: {list(relationships)}")
942
954
  return relationships
943
955
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: django-bulk-hooks
3
- Version: 0.2.68
3
+ Version: 0.2.69
4
4
  Summary: Hook-style hooks for Django bulk operations like bulk_create and bulk_update.
5
5
  License: MIT
6
6
  Keywords: django,bulk,hooks
@@ -14,14 +14,14 @@ django_bulk_hooks/models.py,sha256=TWN_F-SsLGPx9jrkNT9pmJFR5VsZ0Z_QaVOZOmt7bpw,2
14
14
  django_bulk_hooks/operations/__init__.py,sha256=BtJYjmRhe_sScivLsniDaZmBkm0ZLvcmzXFKL7QY2Xg,550
15
15
  django_bulk_hooks/operations/analyzer.py,sha256=Pz8mc-EL8KDOfLQFYiRuN-r0OmINW3nIBhRJJCma-yo,10360
16
16
  django_bulk_hooks/operations/bulk_executor.py,sha256=po8V_2H3ULiE0RYJ-wbaRIz52SKhss81UHwuQjlz3H8,26214
17
- django_bulk_hooks/operations/coordinator.py,sha256=GJKP60To6A7_E3Ge_F-cGSPTx2-BHMBBtE8GK6rO-Pc,37842
17
+ django_bulk_hooks/operations/coordinator.py,sha256=NHQWg36IvWAsbQnAppsExOhFQsvlk_VD-aMwWsoo1ao,38572
18
18
  django_bulk_hooks/operations/field_utils.py,sha256=cQ9w4xdk-z3PrMLFvRzVV07Wc0D2qbpSepwoupqwQH8,7888
19
19
  django_bulk_hooks/operations/mti_handler.py,sha256=Vmz0C0gtYDvbybmb4cDzIaGglSaQK4DQVkaBK-WuQeE,25855
20
20
  django_bulk_hooks/operations/mti_plans.py,sha256=HIRJgogHPpm6MV7nZZ-sZhMLUnozpZPV2SzwQHLRzYc,3667
21
21
  django_bulk_hooks/operations/record_classifier.py,sha256=It85hJC2K-UsEOLbTR-QBdY5UPV-acQIJ91TSGa7pYo,7053
22
22
  django_bulk_hooks/queryset.py,sha256=g_9OtOTC8FXY0hBwYr2FCqQ3mYXbfJTFPLlFV3SHmWQ,5600
23
23
  django_bulk_hooks/registry.py,sha256=4HxP1mVK2z4VzvlohbEw2359wM21UJZJYagJJ1komM0,7947
24
- django_bulk_hooks-0.2.68.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
25
- django_bulk_hooks-0.2.68.dist-info/METADATA,sha256=ny5caEpFwD2Dw2sJtJHVHBL-I1pTBTdU5YDNOysuNRM,9265
26
- django_bulk_hooks-0.2.68.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
- django_bulk_hooks-0.2.68.dist-info/RECORD,,
24
+ django_bulk_hooks-0.2.69.dist-info/LICENSE,sha256=dguKIcbDGeZD-vXWdLyErPUALYOvtX_fO4Zjhq481uk,1088
25
+ django_bulk_hooks-0.2.69.dist-info/METADATA,sha256=HSHw428Qc1u1t--TmPEQmJLx4UcsIF7RHLwOjo798vU,9265
26
+ django_bulk_hooks-0.2.69.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
27
+ django_bulk_hooks-0.2.69.dist-info/RECORD,,