Hi!

 

I got this class arrangement:

 

class Document(Base):

doc_number = Column(:)

       doc_date = Column(:)

       :

 

class Invoice(Document)

class CashOrder(Document)

class BankTransaction(Document)

 

It's joined table inheritance, Document has a table with discriminator etc.
So, I need to iterate through Documents and at each iteration I have to get
"real" object (i.e., Invoice instance). Right now all I got is a collection
of Document objects that contain only doc_number & doc_date fields, nothing
else. I've though that a discriminator field can somehow be of help - if
only I could establish a non-ambiguous link between string it contains and a
class. Any thoughts? Thanks!

-- 
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