onyxframework / sql

A delightful SQL ORM ☺️
https://api.onyxframework.com/sql
MIT License
91 stars 7 forks source link

Merge joined model instances with preloaded direct references #76

Open vladfaust opened 5 years ago

vladfaust commented 5 years ago
post = Post.where(id: 1).join(:author) { |x| x.select(:id, :name) }
pp post # <Post @author=<User @id=42 @name="John"> @content="...">

Should work without :id.