I have the following table in mysql (5.7.12):
class Story(db.Model):
sections_ids = Column(JSON, nullable=False, default=[])
sections_ids is basically a list of integers [1, 2, ..., n]. I need to get all the lines where section_ids contains X. I tried the following:
stories = session.query(Story).filter(
X in Story.sections_ids
).all()
but he throws:
NotImplementedError: Operator 'contains' is not supported on this expression
source
share