Reputation: 6861
Is it possible to do this
select x.name, y.name, y.info
from tag x
join tag y
on y.info like '%#' || x.name || '#%';
with SQLAlchemy? I found examples using LIKE, but only with literals (from the SQL point of view).
Upvotes: 0
Views: 84
Reputation: 3608
session.query(x).join(y).filter("y.info LIKE '%#'||x.name||'#%'").all()
Upvotes: 2