import sqlalchemy as sa
engine = sa.create_engine("<db_url>", echo=False)
meta = sa.MetaData(bind=engine, reflect=True)
a = [t.name for t in meta.sorted_tables]
meta = sa.MetaData(bind=engine, reflect=True)
b = [t.name for t in meta.sorted_tables]
It seems that MetaData.sorted_tables returns a different result each time.While the results seem to be always correct, it is an odd behavior.
I would expect sorted_tables to return the same results every time
import sqlalchemy as sa
engine = sa.create_engine("<db_url>", echo=False)
meta = sa.MetaData(bind=engine, reflect=True)
a = [t.name for t in meta.sorted_tables]
meta = sa.MetaData(bind=engine, reflect=True)
b = [t.name for t in meta.sorted_tables]
a and b are not sorted the same
BTW: meta.tables is consistent ...
--
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 sqlalchemy+...@googlegroups.com.
To post to this group, send email to sqlal...@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.
Nope, I still use 0.9.7 J
It's not a big deal, just seemed odd, but thanks, I will look at it again once I move to 1.0 …
--
You received this message because you are subscribed to a topic in the Google Groups "sqlalchemy" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/sqlalchemy/eYZvKK12qTo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to sqlalchemy+...@googlegroups.com.