-
Nikita Vasilevsky authored
Given an association defined with composite query constraints like: ```ruby BlogPost.has_many :comments, query_constraints: [:blog_id, :blog_post_id] ``` it is possible to query blog posts by whole `comments` objects like: ```ruby comments = Comment.first(2) BlogPost.where(comments: comments).to_a ```
Nikita Vasilevsky authoredGiven an association defined with composite query constraints like: ```ruby BlogPost.has_many :comments, query_constraints: [:blog_id, :blog_post_id] ``` it is possible to query blog posts by whole `comments` objects like: ```ruby comments = Comment.first(2) BlogPost.where(comments: comments).to_a ```
Loading