search for: add_join

Displaying 6 results from an estimated 6 matches for "add_join".

Did you mean: add_joins
2007 Dec 09
0
straight join in rails
...erated sql query, and replace SELECT with SELECT STRAIGHT_JOIN. Here''s a monkey-patch (written against ActiveRecord 1.5.14) that achieves this behaviour: module ActiveRecord class Base class << self VALID_FIND_OPTIONS << :straight_join alias_method :orig_add_joins!, :add_joins! def add_joins!(sql, options, scope = :auto) orig_add_joins!(sql,options,scope) sql.gsub!(/^SELECT/,''SELECT STRAIGHT_JOIN'') if options[:straight_join] end end end end So simply supply a :straight_join => true option to find...
2007 Sep 14
4
Refactoring ActiveRecord's private methods
As it currently stands, ActiveRecord has alot of private and protected methods in the Base class. >> ActiveRecord::Base.methods.size => 427 >> ActiveRecord::Base.protected_methods.size => 32 >> ActiveRecord::Base.private_methods.size => 193 I really loved the suggestion by Courtenay in Refactoring AR::Base.find (http://groups.google.com/group/rubyonrails-core/
2006 Apr 06
7
[Fwd: Rails AR/Oracle Unit Test: [4185] failed]
So my automated script caught this issue, though I think my email headers were bad, so rails-core has put the automated email on hold pending "moderation". I''ll fix that issue, and look at the one below as well. -------- Original Message -------- Subject: Rails AR/Oracle Unit Test: [4185] failed Date: Thu, 6 Apr 2006 08:32:04 -0700 From: Michael Schoen
2009 Mar 09
3
multiple columns primary key
Hi all, I have two tables: TABLE 1 A pk - fk (referencesc TABLE 2) B pk C pk D pk E F TABLE 2 A pk G H I L I don''t use incremental field (id). I''d like don''t use find_by_sql. How can I define both models to use correctly find method (with include)? With only one column primary key I haven''t problems. I thought two solutions, but I don''t like these
2012 Apr 27
0
Wine release 1.5.3
...dmusic: Implement IDirectMusicBufferImpl_PackStructured. dmusic: IDirectMusicBufferImpl_GetUsedBytes. dmusic: Implement IDirectMusicBuffer_GetStartTime and IDirectMusicBuffer_SetStartTime. dmusic: Implement IDirectMusicBufferImpl_Flush. Daniel Lehman (3): gdi32: Don't add_join if points are coincident in wide_line_segments. msvcrt: Add declarations to stdlib.h for _strtoui64 and _strtoi64. oleaut32: Treat years 0 to 29 as 2000 to 2029 in VARIANT_RollUdate. Detlef Riekenberg (2): browseui: Add IOleWindow to IProgressDialog. browseui/tests: Add tes...
2012 Jun 15
0
Wine release 1.4.1
...eleting items other than the first. regedit: Make key names editable also with native comctl32. regedit: Adding new subkey to a key with no subkeys now works with native comctl32. oleaut32: Added support for loading cursors in OLEPicture. Daniel Lehman (3): gdi32: Don't add_join if points are coincident in wide_line_segments. msvcrt: Add declarations to stdlib.h for _strtoui64 and _strtoi64. oleaut32: Treat years 0 to 29 as 2000 to 2029 in VARIANT_RollUdate. Detlef Riekenberg (1): ntdll: Implement RtlGetProductInfo. Dmitry Timoshkov (10): gdiplus:...