Working with Postgresql, how to include many ActiveRecord relations after a join?

0 votes
asked Mar 9, 2016 by code9883 (190 points)
My models are defined as follows:class User has_many :group_assignmentsendclass GroupAssignment belongs_to :groupable, polymorphic: true # Defined specific relation to product # to make. Is it possible instead of showing in row i want to show in gridview

4 Answers

0 votes
answered Apr 26, 2016 by url_7452 (460 points)
Best answer

Usesthe same rules as ActiveRecord: : Base.
commented Apr 26, 2016 by Shellie_it (550 points)
Perhaps you should take this as a hint that your development database is too big
0 votes
answered Mar 10, 2016 by Dependencies (1,950 points)

Let's assume we have Users who posted many Posts.
Themethod returns an array of relationship configurations.
For example, Post belongs to many Category and Category has many Post.
Check the docs Working with Databases: Relational Active Record | The Definitive Guide to Yii | Yii PHP Framework for more info
commented Mar 11, 2016 by fht7315wor (910 points)
ER DiagramInfo: Support for foreign key constraints varies in different DBMS
commented Mar 12, 2016 by yba_9238_Ki (570 points)
Strongly recommend this article
0 votes
answered May 18, 2016 by metzner_632 (560 points)
Searched everywhere for this and finally found a solution that works for us. A bit more information on that at has_many (ActiveRecord::Associations::ClassMethods ...
0 votes
answered May 20, 2016 by Bibbs_Would (140 points)

What is Geekub?

Q&A site for professional and enthusiast programmers, software developers and other technical users. With your help, we hope to work together to build a library of detailed answers to just about any question that is related to programming!