Hi!

 

I've got this setup:

 

cs = "sqlite:///:memory:"
sa_engine = create_engine(cs)
 
Base = declarative_base()
 
class Person(Base):
 
    __abstract__ = True
 
    id = Column(Integer, primary_key=True)
    name = Column(String(30))
 
 
class Employee(Person):
 
    __tablename__ = 'employee'
    manager_id = Column(Integer, ForeignKey('employee.id'))
    manager = relationship('Employee', primaryjoin=(manager_id==Person.id),
remote_side=Person.id) #many-to-one
    comment = Column(String(100))
 
 
Base.metadata.drop_all(sa_engine)
Base.metadata.create_all(sa_engine)
 
Session = sessionmaker(bind=sa_engine)
s = Session()
e1 = Employee(name='John Smith') #sqlalchemy.exc.CompileError: Cannot
compile Column object until it's 'name' is assigned.

 

What gives? 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to