1. 02 11月, 2014 1 次提交
    • S
      Use bind values for joined tables in where statements · 10f75af9
      Sean Griffin 提交于
      In practical terms, this allows serialized columns and tz aware columns
      to be used in wheres that go through joins, where they previously would
      not behave correctly. Internally, this removes 1/3 of the cases where we
      rely on Arel to perform type casting for us.
      
      There were two non-obvious changes required for this. `update_all` on
      relation was merging its bind values with arel's in the wrong order.
      Additionally, through associations were assuming there would be no bind
      parameters in the preloader (presumably because the where would always
      be part of a join)
      
      [Melanie Gilman & Sean Griffin]
      10f75af9
  2. 15 8月, 2014 1 次提交
  3. 25 4月, 2014 1 次提交
  4. 04 3月, 2014 1 次提交
  5. 15 10月, 2013 4 次提交
  6. 13 10月, 2013 1 次提交
  7. 26 9月, 2013 4 次提交
  8. 25 9月, 2013 3 次提交
  9. 24 9月, 2013 6 次提交
  10. 21 9月, 2013 3 次提交
  11. 28 8月, 2013 3 次提交
  12. 30 6月, 2013 1 次提交
  13. 25 2月, 2013 1 次提交
    • Y
      don't apply invalid ordering when preloading hmt associations. · 4ef75b63
      Yves Senn 提交于
      closes #8663.
      
      When preloading a hmt association there two possible scenarios:
      
      1.) preload with 2 queries: first hm association, then hmt with id IN ()
      2.) preload with join: hmt association is loaded with a join on the hm association
      
      The bug was happening in scenario 1.) with a normal order clause on the hmt association.
      The ordering was also applied when loading the hm association, which resulted in the error.
      
      This patch only applies the ordering the the hm-relation if we are performing a join (2).
      Otherwise the order will only appear in the second query (1).
      4ef75b63
  14. 15 2月, 2013 1 次提交
  15. 13 7月, 2012 1 次提交
  16. 17 1月, 2012 1 次提交
  17. 29 12月, 2011 1 次提交
  18. 05 3月, 2011 1 次提交
  19. 01 3月, 2011 1 次提交