Cascading eager loading patch not working in oracle


#1

Notice the “AS” keyword appears many times. Oracle does not support this
keyword:

ActiveRecord::StatementInvalid: OCIError: ORA-00905: missing keyword:
SELECT tim
esheets.id AS t0_r0, timesheets.start_date AS t0_r1, timesheets.status
AS t0_r2,
timesheets.cost AS t0_r3, timesheets.charge AS t0_r4,
timesheets.employee AS t0
r5, employees.id AS t1_r0, employees.name AS t1_r1,
employees.start_date AS t1

r2, employees.cost AS t1_r3, employees.charge AS t1_r4,
employees.username AS t1…

I have just installed edge rails.


#2

Will be fixed with http://dev.rubyonrails.org/ticket/4231

-Jonathan.


#3

Thanks Jonathan,

how do i apply the patch assoc_alias.patch provided from
http://dev.rubyonrails.org/ticket/4231?? I am using windows.

It’s quite urgent so your help is really appreciated!
Thanks,
Chris


#4
  • Grab http://unxutils.sourceforge.net/ to get a Windows version of the
    patch utility.
  • Do a rake freeze_edge
  • Download the assoc_alias.patch into the vendor/rails directory
  • Use the patch utility, something like ‘patch -p0 < assoc_alias.patch’
    from
    inside vendor/rails should do it.

-Jonathan.