rails-4 not getting all columns from 2 tables with join -


यह मेरा मॉडल। आरबी

model.rb

    

सभी विवरण प्राप्त करने के लिए मैंने इस प्रश्न का उपयोग किया है

  User.joins (: computes)। जहां। नहीं (स्की: 'NULL')   

और मुझे USER तालिका से मिला, मुझे भी USER द्वारा COMPUTE से एक या अधिक स्तंभ प्राप्त करने की आवश्यकता है।

आप इस तरह से उपयोग कर सकते हैं

  User.joins (computes)। Where.not (skey : 'NULL')। चुनें ("users.id, computes.name")    

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

Installing croogo for cakephp -