Cascading eager loading patch not working in oracle


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

ActiveRecord::StatementInvalid: OCIError: ORA-00905: missing keyword:
SELECT tim 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, AS t1_r0, 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.


Will be fixed with



Thanks Jonathan,

how do i apply the patch assoc_alias.patch provided from I am using windows.

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

  • Grab 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’
    inside vendor/rails should do it.