- changed status to resolved
mapper compile_pks/reduce columns has an ordering dependency w/ declarative
Issue #1161
resolved
import sqlalchemy as sa
import sqlalchemy.orm as orm
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
# move "Bar" below "Foo" to resolve the issue
class Bar(Base):
__tablename__ = 'bar'
id = sa.Column(sa.Integer, sa.ForeignKey("foo.id"), primary_key=True)
ex = sa.Column(sa.Integer, primary_key=True)
class Foo(Base):
__tablename__ = 'foo'
id = sa.Column(sa.Integer, primary_key=True)
bars = orm.relation(Bar)
Comments (2)
-
reporter -
reporter - removed milestone
Removing milestone: 0.5.0 (automated comment)
- Log in to comment
94c32b19a08182aa5403a893ffd037994199ca44