Hi
I am looking for a solution to make two separate tables(at sql defenition 
level) query-able at orm level.
There is a give database which i have no right to change existing tables 
and i just add two tables to it which one of my tables have a column 
holding id value of a table in give db:
class Given(Base):
    __tablename__ = "given_table"
    gid = Column(Integer, primary_key=True)
    col_1 = ...
    col_2 = ...
    ...

class MyTable(Base):
    __tablename__ = "my_table"
    id = Column(Integer, primary_key=True)
    given_id = Column(Integer)
    ... 

I've managed to fill *'given_id'* column with proper *'gid'* based on some 
conditions. but with or without '*given_id'* column, i am looking for a way 
to have *'Given'* model joinable and query-able by sqlalchemy. i.e:
session.query(MyTable).filter(MyTable.given.col_1 =="value")

I'm not sure how could i use hybrid property or any other way for this 
situation.
Please help me. 

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to