I'm using peewee as ORM and have two classes like this:
class A(Model):
name = CharField()
body = TextField()
class B(Model):
title = CharField()
body = TextField()
I would like to get all entries from A
and B
whose title
/name
start with some characters like 'abc'
. According to the documentation the |
operator should help, but I'm not even able to execute the resulting Expression
. Obviously I would like to have a UNION
and AS
expression behind the scenes. How do I get this via peewee?