Skip to content

quoted_table_name when referencing table ID etc... #17

brendon opened this Issue Feb 24, 2010 · 0 comments

1 participant

brendon commented Feb 24, 2010

Hi Stefan,

I was just wondering if instead of just referring to the 'primary_key' column name in your code, whether you should be prepending that with the quoted table name? I've come across a situation where MySQL thought the reference to 'id' was ambiguous because I had a join in the query. I thought I'd ask because my join was a string rather than a rails generated join, and I'm not sure if rails will return your call to primary_key with a quoted_table_name appended if it detects a rails generated join in the query?



This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.