I've been experiencing a weirdness.

Using SQLAlchemy 0.8.3 and PostgreSQL with declarative (and deferred
reflection), if I don't manually force a reflection *before* I call
prepare then - when I use certain objects - I get an error which
indicates that SQLAlchemy did not reflect secondary tables. Is this a
known issue? It's really hard to find an isolated test case.


InvalidRequestError: When initializing mapper
Mapper|ObjectOne|table_one, expression 'table_one_secondary_table'
failed to locate a name ("name 'table_one_secondary_table' is not
defined"). If this is a class name, consider adding this
relationship() to the <class 'ObjectOne> class after both dependent
classes have been defined.


the table 'table_one_secondary_table' is like this:

class ObjectOne(Base):
  __tablename__ = 'table_one'
  ....
  object_twos = relationship(
    ObjectTwo, backref='object_one',
    cascade="save-update,merge,refresh-expire,expunge",
    secondary='table_one_secondary_table',
    passive_deletes=True
  )

-- 
Jon
Software Blacksmith

-- 
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/groups/opt_out.

Reply via email to