Re: [sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-14 Thread Demitri Muna
I found the problem. Listed here for future generations (or more likely my future self). The classes for each schema I have are defined in separate files. In each I was calling Base = declarative_base(bind=me.engine) I was also doing the same in the class I have that wraps the database

Re: [sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-11 Thread Mike Bayer
On 08/11/2016 01:24 PM, Demitri Muna wrote: Hi Mike, It looks like my Base class was not exactly the same (although it was in my original code), but this is not the problem. I didn't think it was, but it's very difficult for me to be helpful when I only get various out of context lines of

Re: [sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-11 Thread Demitri Muna
Hi Mike, It looks like my Base class was not exactly the same (although it was in my original code), but this is not the problem. I have a custom "DatabaseConnection" Python class that is a singleton and encapsulates the database connection. It's constructed like this: me.engine =

Re: [sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-10 Thread Mike Bayer
On 08/10/2016 09:01 PM, Demitri Muna wrote: Hi Mike, I think I'm more perplexed than before. My search_path was correctly set. I put a breakpoint in my code after all of my classes and relationships are defined and after a call to configure_mappers(). that doesn't make sense because the

Re: [sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-10 Thread Mike Bayer
On 08/10/2016 12:06 PM, Demitri Muna wrote: There's nothing like hitting a brick wall of a problem that you definitively solved years ago. Right before any of these statements I print FitsFile.__table__.foreign_key_constraints and get the wall of text below where I *do* see the foreign key

[sqlalchemy] Joining tables across schema in PostgreSQL

2016-08-10 Thread Demitri Muna
There's nothing like hitting a brick wall of a problem that you definitively solved years ago. I am trying to join two tables across two schema in PostgreSQL. Which was solved here: https://groups.google.com/d/msg/sqlalchemy/iLXMXBIkYiA/sHNyNwFui4kJ and has been used successfully since. But