Hi folks,
Is the GlobalFilter recipe expected to still work with newer versions of
sqlalchemy? I've copied and pasted the code right out of the recipe and get
this assertion:
2017-10-31 21:38:22,391 INFO sqlalchemy.engine.base.Engine SELECT parent.id
AS parent_id, parent.timestamp AS parent_timestamp, child_1.id AS
child_1_id, child_1.parent_id AS child_1_parent_id, child_1.timestamp AS
child_1_timestamp
FROM parent LEFT OUTER JOIN child AS child_1 ON parent.id =
child_1.parent_id AND child_1.timestamp BETWEEN ? AND ?
WHERE parent.timestamp BETWEEN ? AND ?
2017-10-31 21:38:22,391 INFO sqlalchemy.engine.base.Engine ('2009-10-16
12:00:00.000000', '2009-10-18 12:00:00.000000', '2009-10-16
12:00:00.000000', '2009-10-18 12:00:00.000000')
2017-10-31 21:38:22,392 INFO sqlalchemy.engine.base.Engine SELECT parent.id
AS parent_id, parent.timestamp AS parent_timestamp
FROM parent
WHERE parent.timestamp BETWEEN ? AND ?
2017-10-31 21:38:22,392 INFO sqlalchemy.engine.base.Engine ('2009-10-16
12:00:00.000000', '2009-10-18 12:00:00.000000')
2017-10-31 21:38:22,393 INFO sqlalchemy.engine.base.Engine SELECT child.id
AS child_id, child.parent_id AS child_parent_id, child.timestamp AS
child_timestamp
FROM child
WHERE ? = child.parent_id AND child.timestamp BETWEEN ? AND ?
2017-10-31 21:38:22,393 INFO sqlalchemy.engine.base.Engine (2, None, None)
Traceback (most recent call last):
File "globalfilter_original.py", line 114, in <module>
assert parents[0].temporal_children == [c5]
AssertionError
I backtracked to sqlalchemy 0.9.10 to confirmed it works as advertised, and
then rolled forward to 1.0.0 to confirmed it fails.
I also observed that in 1.0.0+, TemporalOption.process_query is never
called.
Thanks,
Jason
--
SQLAlchemy -
The Python SQL Toolkit and Object Relational Mapper
http://www.sqlalchemy.org/
To post example code, please provide an MCVE: Minimal, Complete, and Verifiable
Example. See http://stackoverflow.com/help/mcve for a full description.
---
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.