andymeneely / chromium-history

Scripts and data related Chromium's history
11 stars 4 forks source link

TechnicalWords association doesn't work #227

Closed andymeneely closed 9 years ago

andymeneely commented 9 years ago
TechnicalWord.joins(:code_reviews)
PG::UndefinedTable: ERROR:  relation "code_reviews_technical_words" does not exist
LINE 1: ...hnical_words".* FROM "technical_words" INNER JOIN "code_revi...
                                                             ^
: SELECT "technical_words".* FROM "technical_words" INNER JOIN "code_reviews_technical_words" ON "code_reviews_technical_words"."technical_word_id" = "technical_words"."id" INNER JOIN "code_reviews" ON "code_reviews"."issue" = "code_reviews_technical_words"."code_review_id"
Hirb Error: PG::UndefinedTable: ERROR:  relation "code_reviews_technical_words" does not exist
LINE 1: ...hnical_words".* FROM "technical_words" INNER JOIN "code_revi...
                                                             ^
: SELECT "technical_words".* FROM "technical_words" INNER JOIN "code_reviews_technical_words" ON "code_reviews_technical_words"."technical_word_id" = "technical_words"."id" INNER JOIN "code_reviews" ON "code_reviews"."issue" = "code_reviews_technical_words"."code_review_id"

We need to get this association working, and write a verify for this. We need this ASAP to help @rikal's issue #226.

bspates commented 9 years ago

@andymeneely There is no association between code reviews and technical words directly. You need to join through messages or comments.

bspates commented 9 years ago

This was an issue with the wrong association declaration in the technical words model.