Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #10878 (reopened defect)

Opened 6 months ago

Last modified 3 months ago

[PATCH] Tests, and tiny fix for has_many through association with non-conventional primary key

Reported by: codafoo Assigned to: core
Priority: normal Milestone: 2.x
Component: ActiveRecord Version: edge
Severity: normal Keywords: tiny patch
Cc: codafoo@gmail.com

Description

There was a defect when building the inner join SQL condition in a has_many through belongs_to association that is only picked up when not using the conventional "id" primary_key. This patch includes models/fixtures that overlap with another patch I recently submitted for catching a similar error on the new preloading activerecord features.

Attachments

has_many_through_non_conventional_ids_fix.patch (5.5 kB) - added by codafoo on 01/21/08 09:54:01.
Patch to fix the defect mentioned.

Change History

01/21/08 09:54:01 changed by codafoo

  • attachment has_many_through_non_conventional_ids_fix.patch added.

Patch to fix the defect mentioned.

01/23/08 03:44:46 changed by codafoo

  • keywords set to tiny patch.

04/01/08 09:35:56 changed by codafoo

  • status changed from new to closed.
  • resolution set to duplicate.

There are additional problems, that have been uncovered in another patch(#6461) that takes care of the issue.

04/03/08 16:22:51 changed by codafoo

  • status changed from closed to reopened.
  • resolution deleted.
  • summary changed from [PATCH] Tests, and tiny fix for has_many through belongs_to association with non-conventional primary_key to [PATCH] Tests, and tiny fix for has_many through association with non-conventional primary key.

nevermind, I decided to re-open this as the work in #6461 is less likely to be applied anytime soon.