This project is archived and is in readonly mode.

#4413 ✓stale
Greg Hazel

test_belongs_to_reassign_with_namespaced_models_and_counters failure

Reported by Greg Hazel | April 16th, 2010 @ 10:01 AM

Rails 2-3-stable
Ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
ruby 1.9.1p376 (2009-12-07 revision 26041) [i386-mswin32]

rake test_mysql TEST=test/cases/associations/belongs_to_associations_test.rb

  1) Error:
test_belongs_to_reassign_with_namespaced_models_and_counters(BelongsToAssociationsTest):
ActiveRecord::StatementInvalid: Mysql::Error: Column 'written_on' cannot be null: INSERT INTO `topics` (`title`, `author_name`, `parent_title`, `type`, `approved`, `bonus_time`, `replies_count`, `author_email_address`, `written_on`, `content`, `last_read`, `parent_id`) VALUES('t1', NULL, NULL, NULL, 1, NULL, 0, NULL, NULL, NULL, NULL, NULL)
    ./test/cases/../../lib/active_record/connection_adapters/abstract_adapter.rb:219:in `log'
    ./test/cases/../../lib/active_record/connection_adapters/mysql_adapter.rb:323:in `execute_without_query_record'
    ./test/cases/helper.rb:36:in `execute'
    ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
    ./test/cases/../../lib/active_record/connection_adapters/mysql_adapter.rb:333:in `insert_sql'
    ./test/cases/../../lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
    ./test/cases/../../lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
    ./test/cases/../../lib/active_record/base.rb:2944: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:2910: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:2568:in `save_without_validation'
    ./test/cases/../../lib/active_record/validations.rb:1078:in `save_without_dirty'
    ./test/cases/../../lib/active_record/dirty.rb:79:in `save_without_transactions'
    ./test/cases/../../lib/active_record/transactions.rb:229:in `send'
    ./test/cases/../../lib/active_record/transactions.rb:229:in `with_transaction_returning_status'
    ./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:228:in `with_transaction_returning_status'
    ./test/cases/../../lib/active_record/transactions.rb:196:in `save'
    ./test/cases/../../lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
    ./test/cases/../../lib/active_record/transactions.rb:196:in `save'
    ./test/cases/../../lib/active_record/base.rb:726:in `create'
    ./test/cases/associations/belongs_to_associations_test.rb:231:in `test_belongs_to_reassign_with_namespaced_models_and_counters'
    ./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'

Comments and changes to this ticket

  • Greg Hazel

    Greg Hazel April 16th, 2010 @ 10:04 AM

    MySQL is in sql-mode TRADITIONAL, if that matters.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:43 PM

    • State changed from “new” to “open”

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:43 PM

    • State changed from “open” to “stale”
  • Greg Hazel

    Greg Hazel February 2nd, 2011 @ 07:25 PM

    • State changed from “stale” to “open”

    [state:open]

  • rails

    rails May 3rd, 2011 @ 01:00 AM

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • rails

    rails May 3rd, 2011 @ 01:00 AM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Pages