Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Active record 3.1 does not respect set_primary_key. #3104

Closed
mickeb opened this issue Sep 22, 2011 · 2 comments
Closed

Active record 3.1 does not respect set_primary_key. #3104

mickeb opened this issue Sep 22, 2011 · 2 comments
Assignees
Milestone

Comments

@mickeb
Copy link

mickeb commented Sep 22, 2011

When trying to access a polymorphic association activerecord 3.1 does not respect the non default primary key (set by set_primary_key), but instead uses default primary key (id) in the generated sql.

This is not an issue on 3.0.10

Single file example app available: https://github.com/ZmartGroup/active_record_bug_report

Quick paste and reproduce:
git clone git://github.com/ZmartGroup/active_record_bug_report.git && cd active_record_bug_report && bundle install && bundle exec ruby program.rb

@jonleighton
Copy link
Member

Thanks for a great bug report script :)

@mickeb
Copy link
Author

mickeb commented Sep 26, 2011

No problem =)

It was easy with the template from you blog. Maybe it should be posted on weblog.rubyonrails.org as well?

martinploeger pushed a commit to martinploeger/rails that referenced this issue Sep 26, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants