Closed vladfaust closed 5 years ago
posts = Onyx.query(Post .select(nil) .join(:author) do |x| x.select(:name) x.where(id: 1) end )
SELECT author.name FROM posts JOIN users AS author ON users.id = posts.author_id WHERE author.id = ?