thewoolleyman@gmail.com
2009-Sep-01 17:40 UTC
[CruiseControl] rails_2-3-stable build 594a281 failed
The build failed. CHANGES ------- Revision ...594a281 committed by José Valim <jose.valim@gmail.com> on 2009-09-01 11:11:15 Assert primary key does not exist in habtm when the association is defined, instead of doing that everytime a record is inserted. [#3128 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> activerecord/lib/active_record/associations.rb | 24 ++++++++++---------- .../has_and_belongs_to_many_association.rb | 16 ------------- .../cases/associations/habtm_join_table_test.rb | 16 +----------- activerecord/test/fixtures/edges.yml | 3 +- activerecord/test/schema/schema.rb | 2 +- 5 files changed, 16 insertions(+), 45 deletions(-) TEST FAILURES AND ERRORS ----------------------- Name: test_create_associate_when_adding_to_has_many_through(AssociationsJoinModelTest) Type: Failure Message: Exception raised: Class: <ActiveRecord::StatementInvalid> Message: <"PGError: ERROR: column \"id\" does not exist\nLINE 1: ...\"edges\" (\"sink_id\", \"source_id\") VALUES(5, 1) RETURNING \"id\"\n ^\n: INSERT INTO \"edges\" (\"sink_id\", \"source_id\") VALUES(5, 1) RETURNING \"id\""> ---Backtrace--- ./test/cases/../../lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'' ./test/cases/../../lib/active_record/connection_adapters/postgresql_adapter.rb:550:in `execute_without_query_record'' ./test/cases/helper.rb:36:in `execute'' ./test/cases/../../lib/active_record/connection_adapters/postgresql_adapter.rb:1037:in `select_raw'' ./test/cases/../../lib/active_record/connection_adapters/postgresql_adapter.rb:1024:in `select'' ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:7:in `select_all_without_query_cache'' ./test/cases/../../lib/active_record/connection_adapters/abstract/query_cache.rb:62:in `select_all'' ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:13:in `select_one'' ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:19:in `select_value'' ./test/cases/../../lib/active_record/connection_adapters/postgresql_adapter.rb:490:in `insert'' ./test/cases/../../lib/active_record/base.rb:2901:in `create_without_timestamps'' ./test/cases/../../lib/active_record/timestamp.rb:53:in `create_without_callbacks'' ./test/cases/../../lib/active_record/callbacks.rb:266:in `create'' ./test/cases/../../lib/active_record/base.rb:2867:in `create_or_update_without_callbacks'' ./test/cases/../../lib/active_record/callbacks.rb:250:in `create_or_update'' ./test/cases/../../lib/active_record/base.rb:2555:in `save_without_validation!'' ./test/cases/../../lib/active_record/validations.rb:1088:in `save_without_dirty!'' ./test/cases/../../lib/active_record/dirty.rb:87:in `save_without_transactions!'' ./test/cases/../../lib/active_record/transactions.rb:200:in `save!'' ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'' ./test/cases/../../lib/active_record/transactions.rb:182:in `transaction'' ./test/cases/../../lib/active_record/transactions.rb:200:in `save!'' ./test/cases/../../lib/active_record/transactions.rb:208:in `rollback_active_record_state!'' ./test/cases/../../lib/active_record/transactions.rb:200:in `save!'' ./test/cases/../../lib/active_record/validations.rb:1059:in `create!'' ./test/cases/../../lib/active_record/reflection.rb:179:in `create_association!'' ./test/cases/../../lib/active_record/associations/has_many_through_association.rb:70:in `insert_record'' ./test/cases/../../lib/active_record/base.rb:2143:in `with_scope'' ./test/cases/../../lib/active_record/associations/has_many_through_association.rb:70:in `send'' ./test/cases/../../lib/active_record/associations/has_many_through_association.rb:70:in `insert_record'' ./test/cases/../../lib/active_record/associations/association_collection.rb:119:in `<<'' ./test/cases/../../lib/active_record/associations/association_collection.rb:433:in `add_record_to_target_with_callbacks'' ./test/cases/../../lib/active_record/associations/association_collection.rb:118:in `<<'' ./test/cases/../../lib/active_record/associations/association_collection.rb:116:in `each'' ./test/cases/../../lib/active_record/associations/association_collection.rb:116:in `<<'' ./test/cases/../../lib/active_record/associations/association_collection.rb:141:in `transaction'' ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'' ./test/cases/../../lib/active_record/transactions.rb:182:in `transaction'' ./test/cases/../../lib/active_record/associations/association_collection.rb:140:in `transaction'' ./test/cases/../../lib/active_record/associations/association_collection.rb:115:in `<<'' ./test/cases/associations/join_model_test.rb:504:in `test_create_associate_when_adding_to_has_many_through'' ./test/cases/associations/join_model_test.rb:504:in `test_create_associate_when_adding_to_has_many_through'' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run'' --------------- ./test/cases/associations/join_model_test.rb:504:in `test_create_associate_when_adding_to_has_many_through'' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `__send__'' ./test/cases/../../../activesupport/lib/active_support/testing/setup_and_teardown.rb:62:in `run'' See http://ci.rubyonrails.org/builds/rails_2-3-stable/594a281 for details.