The changes to improve table aliasing in [3776] broke all sorts of associations for Oracle. The issue is that Oracle doesn''t allow for table aliases using the AS keyword. ... LEFT OUTER JOIN authors AS authors ... is no good, but ... LEFT OUTER JOIN authors authors ... is just dandy. Does the latter also work ok for MySQL, etc? I''ve got a patch prepared, looking for confirmation that dropping the AS works for the supported dbs. The alternatives seem ugly.
On 3/14/06, Michael Schoen <schoenm@earthlink.net> wrote:> The changes to improve table aliasing in [3776] broke all sorts of > associations for Oracle. > > The issue is that Oracle doesn''t allow for table aliases using the AS > keyword. > > ... LEFT OUTER JOIN authors AS authors ... > > is no good, but > > ... LEFT OUTER JOIN authors authors ... > > is just dandy. > > Does the latter also work ok for MySQL, etc? > > I''ve got a patch prepared, looking for confirmation that dropping the AS > works for the supported dbs. The alternatives seem ugly. >I can confirm it works for mysql 4.1 and postgres, 8.1 and appears fine on sqlite 2. -- Cheers Koz
Michael Koziarski wrote:> I can confirm it works for mysql 4.1 and postgres, 8.1 and appears > fine on sqlite 2.Great. I''ve got a few patches for the Oracle adapter as well, would you like it all bundled together, or 2 patches, one for assocations.rb, and one for oracle_adapter.rb?
>> Does the latter also work ok for MySQL, etc? > > I can confirm it works for mysql 4.1 and postgres, 8.1 and appears > fine on sqlite 2.I can confirm it works for SQL Server 2000 as well. -- Jakob Skjerning - http://mentalized.net
Jakob Skjerning wrote:>>> Does the latter also work ok for MySQL, etc? >> >> I can confirm it works for mysql 4.1 and postgres, 8.1 and appears >> fine on sqlite 2. > > I can confirm it works for SQL Server 2000 as well.Thanks. Patch submitted as: http://dev.rubyonrails.org/ticket/4231 Also submitted the Oracle patches I spoke of: http://dev.rubyonrails.org/ticket/4230
Fine with mysql 5.0 -Jonathan. _______________________________________________ Rails-core mailing list Rails-core@lists.rubyonrails.org http://lists.rubyonrails.org/mailman/listinfo/rails-core
On Mar 14, 2006, at 12:33 AM, Michael Schoen wrote:> I''ve got a patch prepared, looking for confirmation that dropping > the AS works for the supported dbs. The alternatives seem ugly.I haven''t tried the patch yet, but it should work just fine with the Sybase adapter. John -- John R. Sheets http://umber.sourceforge.net http://writersforge.sourceforge.net