I think I'm near but I can't finish :
for all the structure : https://dpaste.de/fek5#L
and here my query :
self.session.query(Object).outerjoin(ObjectStatus).outerjoin(Status)\
.group_by(Object).with_entities(Object,
func.max(Status.datum).label("status_datum")).subquery()
self.session.query(Object).join((sub, sub.c.id == Status.id))\
.filter(sub.c.statustype_id > 50)
but status type not reachable.
--
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.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sqlalchemy/fe2da543-2710-4b44-9f88-e68c5e35faea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.