librelist archives

« back to archive

Flask SQLAlchemy ignores ordering in relationships

Flask SQLAlchemy ignores ordering in relationships

From:
Nicholas Retallack
Date:
2011-02-11 @ 19:27
http://friendpaste.com/2EBQ2hT2PLXMWmMiq4LeKI

Here's a simple example where I've set up a relationsihp with an order_by in
its backref.  It works in regular sqlalchemy, but the flask sqlalchemy
extension screws it up somehow and doesn't apply the ordering.  Skimming
through the source code, I'm not sure why this would happen, but it's
reproducible.  Try running my example in two different python files and see.