use the relation as a join path, and then whatever
filtering/ordering....
try:
unit.join(Unit.records).order_by(Record.date.desc()).first()
or
unit.join('records').order_by(Record.date.desc()).first()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---