Changes between Initial Version and Version 1 of Ticket #35256, comment 1
- Timestamp:
- Feb 26, 2024, 10:48:18 AM (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #35256, comment 1
initial v1 2 2 3 3 The TL;DR is that `filter` won't reuse existing JOINs but `annotate` will. Changing it now is non trivial as there are legitimate reasons for not doing so which makes be believe we need an optin mechanism when doing either about JOIN reuse. 4 5 The reason why this happens is the following. When the annotation is made before it refers to the fullset of objects as `filter` has not been called yet and thus `filter` lack of JOIN reuse avoids changing what `price` refers to as it might have been referenced by other expressions since then. In the scenario the relationship is already filtered so by the point the annotation is made it can only refer to the filtered relationship. Whether or not this is intuitive is debatable but changing the ORM to do one over the other without option would be backward incompatible.