私のアプリでは、主なオブジェクトはアカウントと電話であり、典型的なhas_many:throughContactsを使用します。
Account:
has_many :contacts
has_many :phones, :though => contacts
Phone:
has_many :contacts
has_many :accounts, :though => :contacts
Contact:
belongs_to :account
belongs_to :phone
連絡先にはsignup_status、nameのフィールドがあります一意のアカウント/電話のペアごとに1つの連絡先があります
id = 123のアカウントで、5つの連絡先があり、各連絡先に1つの電話がある場合、5つの行すべてを生成し、すべてのアカウントフィールドと連絡先フィールドと電話フィールドを含むクエリはありますか?