Выдает “ SELECT status.id AS status_id, status.status_name AS status_status_name, status.serial_id AS status_serial_id FROM status WHERE :param_1 = status.serial_id”
class Serials(db.Model): id = db.Column(db.Integer, primary_key=True) serial = db.Column(db.String(30)) packet_id = db.Column(db.String(39)) date_cr = db.Column(db.String(22)) # Packet create date_pk= db.Column(db.String(22)) # Packet packing date_sd = db.Column(db.String(22)) # Packet start dru date_fd= db.Column(db.String(22)) # Packet finish dry status_id = db.relationship("Status", backref ="sernick", lazy = 'dynamic') dry_id = db.Column(db.String(30)) def __init__(self, serial): self.serial = serial def __repr__(self): return "<Serials(serial='%s'>" % (self.serial) class Status(db.Model): id = db.Column(db.Integer, primary_key=True) status_name = db.Column(db.String(20)) serial_id = db.Column(db.Integer, db.ForeignKey('serials.id')) def __init__(self, status_name): self.status_name = status_name def __repr__(self):