Hello,
First, thanks to the author(s) for the very nice ORM which has made my life a lot easier.
However.... I suspect I'm not using it fully, often writing SQL queries to find things that can probably be done more neatly within RedBean.
Specifically: how do I find beans that do *not* have a given tag? Suppose I have tables "users", "tag" and "tag_users". I want to find all rows (beans) in "users" that do NOT have tag T. At present I find T in the tag table so I know its ID - let's call it T_id - and then I do this SQL:
SELECT * FROM
users u LEFT JOIN tag_users tu ON
u.id = tu.users_id AND tu.tag_id=T_id
This works fine, but it doesn't fit nicely with other RedBean code. Any better way?
Jonathan