Mike Bayer committed 42edc92 Merge

merge default

Comments (0)

Files changed (2)


         __tablename__ = 'company'
         id = Column(Integer, primary_key=True)
         name = Column(String(50))
         employees = relationship("Employee",
                         cascade='all, delete-orphan')
     class Employee(Base):
         __tablename__ = 'employee'
         id = Column(Integer, primary_key=True)
         company_id = Column(Integer, ForeignKey(''))
         __mapper_args__ = {
-            'polymorphic_identity':employee',
+            'polymorphic_identity':'employee',
     class Engineer(Employee):
         __tablename__ = 'engineer'
         id = Column(Integer, ForeignKey(''), primary_key=True)
+        engineer_info = Column(String(50))
         __mapper_args__ = {'polymorphic_identity':'engineer'}
     class Manager(Employee):
         __tablename__ = 'manager'
         id = Column(Integer, ForeignKey(''), primary_key=True)
+        manager_data = Column(String(50))
         __mapper_args__ = {'polymorphic_identity':'manager'}
 When querying from ``Company`` onto the ``Employee`` relationship, the
 is converted into an aliased subquery.  Some backends, such as SQLite and older
 versions of MySQL can't handle a FROM clause of the following form::
-    FROM x JOIN (y JOIN z ON <onclause>) ON <onclause>`` - using ``aliased=True
+    FROM x JOIN (y JOIN z ON <onclause>) ON <onclause>
 Using ``aliased=True`` instead renders it more like::


 primaryjoin, order_by etc. expressions should use the string forms
 for these arguments, so that they are evaluated as late as possible.
 To reference the mixin class in these expressions, use the given ``cls``
-to get it's name::
+to get its name::
     class RefTargetMixin(object):