1. 26 1月, 2018 2 次提交
  2. 23 1月, 2018 1 次提交
  3. 15 1月, 2018 1 次提交
  4. 10 1月, 2018 1 次提交
  5. 04 1月, 2018 1 次提交
    • R
      Fix newly added reflection order when redefining association · 652258e4
      Ryuta Kamizono 提交于
      Currently reflections keeps the order when first added even if when
      redefining association. As a result of the order, redefining through
      association which use newly added association will raise
      `HasManyThroughOrderError`. We need to redefine reflection order as well
      when redefining association.
      
      Fixes #31068.
      652258e4
  6. 01 1月, 2018 1 次提交
  7. 27 12月, 2017 1 次提交
  8. 14 12月, 2017 1 次提交
  9. 12 12月, 2017 1 次提交
  10. 27 11月, 2017 1 次提交
  11. 26 11月, 2017 1 次提交
  12. 09 11月, 2017 4 次提交
  13. 06 11月, 2017 2 次提交
  14. 30 10月, 2017 1 次提交
  15. 27 10月, 2017 4 次提交
  16. 24 10月, 2017 2 次提交
  17. 23 10月, 2017 2 次提交
  18. 15 10月, 2017 1 次提交
  19. 14 10月, 2017 1 次提交
  20. 09 10月, 2017 1 次提交
  21. 07 9月, 2017 1 次提交
  22. 02 9月, 2017 3 次提交
  23. 01 9月, 2017 1 次提交
  24. 25 8月, 2017 1 次提交
  25. 23 8月, 2017 1 次提交
    • Y
      Load both `:authors` and `:author_addresses` to keep data integrity · 43c6a683
      Yasuo Honda 提交于
      `:authors` has a foreign key to `:author_addresses`.
      If only `:authors` fixture loaded into the database which supports
      foreign key and checks the existing data when enabling foreien keys
      like Oracle, it raises the following error
      
      `ORA-02298: cannot validate (ARUNIT.FK_RAILS_94423A17A3) - parent keys not found`
      
      It is because there is no parent data exists in `author_addresses` table.
      
      Here are how other database with foreign key support works:
      
      - MySQL does not check the existing data when enabling foreign key by `foreign_key_checks=1`
      https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_foreign_key_checks
      > Setting foreign_key_checks to 1 does not trigger a scan of the existing table data. Therefore, rows added to the table while foreign_key_checks=0 will not be verified for consistency.
      
      - PostgreSQL database itself has a feature to check existing data when
      enabling foreign key and discussed at #27636, which is reverted.
      43c6a683
  26. 22 8月, 2017 1 次提交
    • Y
      Automatically guess the inverse associations for STI · 30ef715d
      yui-knk 提交于
      ActiveRecord associations automatically guess the inverse associations.
      But this feature does not work correctly on assoctions for STI.
      For example, before this commit
      
      ```
      class Post < ActiveRecord::Base
        belongs_to :author
      end
      
      class SpecialPost < Post; end
      
      class Author < ActiveRecord::Base
        has_many :posts
        has_many :special_posts
      end
      ```
      
      `author.posts.first.author` works correctly, but
      `author.special_posts.first.author` does not work correctly.
      30ef715d
  27. 18 8月, 2017 1 次提交
  28. 15 8月, 2017 1 次提交