2 ms·
I'm not sure why you think we shouldn't be composing SQL. What about for cases like: User.banned.posts.flagged where we want all flagged posts from banned use
by treis 6y ago
I'm not sure why you think we shouldn't be composing SQL. What about for cases like:
User.banned.posts.flagged where we want all flagged posts from banned users.
Posts.flagged.today where we want all flagged posts from today
User.created_today.posts.flagged where we want all flagged posts from users created today
- platz 6y agoOr you could just create a View for flagged posts and join on that as appropriate, no ORM needed. There's probably some room for limited compositional SQL, but there are ways to get that without a full ORM, given your type system is expressive enough.