similar to: Limited eager loads and conditions on the eager tables

Displaying 20 results from an estimated 10000 matches similar to: "Limited eager loads and conditions on the eager tables"

2007 Sep 25
2
Patch Review for selective joining of eager-loaded tables in pre-query
For those of you following the earlier saga of the performance of limited eager loading, I''ve decided to give up on pursuing my original patch. I received some support on the simplification argument (see my blog if you don''t know what I''m talking about), but it doesn''t seem like it''s worth breaking existing behavior. So I''m moving onto
2006 Aug 16
1
using :select with :include to limit eager loading
Activerecord''s find option `:select'' does not appear to work when :include is used to eager load associations. However, I sometimes want to perform ready-made joins on associations to limit the results of a query. here''s a simple example: table university: STRING code INT id table term: STRING name INT university_id INT id the associations of the models
2008 Jun 25
1
"Complex" Eager Loads
Hey gang. Is it possible to extend the eager load SQL at all? What I''m hoping to do is eagerly load an associate that, in turn, joins in some data from another table. Many thanks, James --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email
2006 Jun 28
4
Load IDs For Limited Eager Loading
Hi Trying to cut down on queries with eager loading and noticed the following in development.log Load IDs For Limited Eager Loading - SELECT id ....etc Followed by Load Including Associations - SELECT table.id ... etc Is this common practice? What is limted eager loading? Cheers Mark -- Posted via http://www.ruby-forum.com/.
2006 Jan 31
4
Rails bug? Conditions on associations ignored by eager loading
I''m looking for someone to confirm the following as a bug in Rails 1.0 before I post it to Trac. If I use eager loading on an association that has conditions defined, the conditions are ignored. The following example illustrates the problem. I have two tables: create_table "blogs", :force => true do |t| t.column "name", :string end create_table
2010 Oct 25
1
A few fixes to eager loading issues
Hey all, I''d really appreciate some eyes on https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/5845-activerecord-3-eager-loading-fail#ticket-5845-19. There''s a small issue in Rails 3 eager loading, and this ticket has an accompanying patch. Sssociations that show up twice in a Relation chain like: Article.includes(:comments).includes(:comments =>
2006 Jul 31
0
Patch for #3438: Eager loading doesn''t respect :order of associations
Hello all, I still have a patch for #3438 (eager loading doesn''t respect association orders); it passes all unit tests, and has additional unit tests with full coverage. The patch is attached. == The Bug == Author.find(1).posts != Author.find(1, :include => [:posts]).posts if Author has_many :posts, :order => anything. This means that either one must avoid eager loading or
2006 Nov 28
0
Eager loading: what am I doing wrong?
I am trying to get eager loading to work. So far it does have an effect on the initial query issued - though not the desired on: it just mentions all the fields explicitly, but creates no joins: [4;36;1mCourse Load Including Associations (0.002771) [0m [0;1mSELECT courses.`id` AS t0_r0, courses.`name` AS t0_r1, courses.`reference` AS t0_r2, courses.`subject_id` AS t0_r3, courses.`course_type_id`
2006 Feb 12
3
Error when Eager Loading "Not unique table/alias"
Hi list, I get the error "Not unique table/alias" (myql 4.1) when trying eager load 2 classes that use the same base class (not STI) Example: <code> class Wedding < ActiveRecord::Base belongs_to :bride, :class_name => ''Person'', :foreign_key => ''bride_id'' belongs_to :groom, :class_name => ''Person'',
2005 Jul 26
6
eager associations and limit/offset
Hi, currently the eager association loading via ":include" does not work when a has-many or habtm association is combined with offset/limit (which is required for paginations). This is because in these cases, the result set will contain more than one row per object, but limit/offset works on row numbers. I''ve developed a patch that makes this work by using 2 SQL statements
2005 Jul 14
1
Single-table inheritance and eager loading
I have a people table with four types of people: clients, spouses, children, and others all setup using single-table inheritance with a foreign key back to a household record. A Household has_one client and spouse, and has_many children and others. I want to use a single "Household.find(@session [:household_id], :include => [:client, :spouse, :children, :others])"
2006 Jun 16
0
Draggables, Floats, DOM and IE
Hello All, While performing work on an upcoming project, we are running into a problem where floats are not showing up in draggables under IE when these elements are dynamically added to a container via the DOM. Of course, we are re-initializing the Draggables on re-insertion, but IE is not rendering the floats -- although they are there, and once the element is dragged, they appear. For a
2007 Feb 14
3
eager loading parents and children (acts_as_tree)
I am struggling with how to do eager loading of an acts_as_tree model. If the model Stuff acts_as_tree I know I can do this to get children as well: Stuff.find(:all, :include => :children) But what if the model I am including is the one that acts_as_tree? For example, say Picture belongs_to Category. Category acts_as_tree and I want to get all pictures that are members of a category that
2006 Jan 09
2
turning revert off after being dropped
I have a container ''A'' which contains Draggables and a Droppable ''Trash''. These Draggables are set with ''revert:true''. Now, if a Draggable from ''A'' is dropped in the Trash, I don''t want it to revert, I want it to just disappear. I''ve tried using draggable.destroy() but this just prevents it from being
2010 Feb 14
2
has_many :through eager loading only loading one record
Hello, I''ve been using Rails for years, including has_many :through and eager loading, but this one has me stumped. The problem is that Active Record is only eager-loading the first of many records. Here are the models (note set_table_name for a legacy schema): class Tag < ActiveRecord::Base set_table_name ''tag'' end class DishTag < Tag has_many
2006 Feb 09
3
Draggables and Droppable performance (tips)
Hi all. I have some performance tips to share. I had been having problems with the overall performance of the drag/drop objects. This is due largely to the fact that my project really pushes the limits (potentially thousands of draggables and hundreds of droppables in the document at a time, although that is the extreme case). Something I discovered is that the performance of dragging goes WAY
2007 Nov 08
0
Dynamic relation with eager loading
A model has 2 columns in its table asset_type_id asset_id the asset_type_id links directly to the table asset_types via a belongs_to asset_types contains a single column ''name'' method_missing in the model says when you call a method matching /^asset.*/ call the corresponding method substituting ''asset'' for the contents of asset_type.name (ie. the name in
2008 Jan 04
1
eager loading and polymorphic associations
There is a dedicated section about eager loading in the docs. A coworker discovered eager loading does not work in polymorphic associations the hard way :-) so I''ve written a patch that documents it: http://dev.rubyonrails.org/ticket/10610 There are at least a couple of tickets that implement something that would change that though: http://dev.rubyonrails.org/ticket/9640
2005 Jul 07
0
How to make drag & drop effect like my msn''s ?
Hi, I found that Sortable is the most similar solution, but it seems draggables cannot be dragged back to the original container if all draggables were dragged out the container. And I have to drag & drop a draggable element overlap another one. -- Regards. Yufan -------------- next part -------------- An HTML attachment was scrubbed... URL:
2006 Nov 06
2
Eager Finder SQL
Hi, I just uploaded a Rails plugin that allows you to specify custom SQL when doing a find with associations (AKA eager loading). One of the problems I encountered when implementing the Chacha Underground (http://underground.chacha.com) was being able to use queries provided by the DBA to efficiently get all the informaion I needed to render a page. In some cases, I needed to go two or three