© 2026 Hedgehog Software, LLC
table team (id, ...)
table user (id, team_id, ...)
relations
db.query.user.findMany({ with: { team: { with: { members: { where: { /* member id != user id */ } }, }, }. }, });
[email protected]