Hi All, With the model from my previous post, I'm looking to find the latest Record for a particular Unit.
Someone on #sqlalchemy suggested this: unit = session.query(Unit).filter(Unit.id==3).first() record = unit.records.order_by(Record.date.desc()).first() ...however, this gives me: AttributeError: 'InstrumentedList' object has no attribute 'order_by' How should I be looking to do this? cheers, Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---