Given the following classes/tables:
class TagList(Base):
TagID = Column(Integer, primary_key=True)
trafficInputs = relationship('TrafficInput', secondary='TagCaseLink',
order_by='Traffic.Time')
class TagCaseLink(Base):
TagID = Column(Integer, ForeignKey('TagList.TagID'), primary_key=True)
TrafficInputID = Column(Integer,
ForeignKey('TrafficInput.TrafficInputID'))
class TrafficInput(Base):
TrafficInputID = Column(Integer, primary_key=True)
TrafficDeviceID = Column(Integer,
ForeignKey('TrafficDevice.TrafficDeviceID'), nullable=False)
ConfigID = Column(Integer, ForeignKey('Config.ConfigID'),
nullable=False)
class TrafficDevice(Base):
TrafficDeviceID = Column(Integer, primary_key=True)
TrafficID = Column(Integer, ForeignKey('Traffic.TrafficID'),
nullable=False)
DeviceID = Column(Integer, ForeignKey('Device.DeviceID'),
nullable=False)
class Traffic(Base):
TrafficID = Column(Integer, primary_key=True)
TrafficName = Column(String, nullable=False)
Time = Column(DateTime, nullable=False)
I get the following error: sqlalchemy.exc.ProgrammingError:
(ProgrammingError) missing FROM-clause entry for table "Traffic"
So TagList contains a list of trafficInputs that I want ordered by
Traffic.Time. Is there anyway of doing this?
--
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.
For more options, visit https://groups.google.com/groups/opt_out.