1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/lib/active_record/associations
Sean Griffin 10f75af933 Use bind values for joined tables in where statements
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]
2014-11-01 15:39:51 -06:00
..
builder Change gsub to tr where possible 2014-10-06 14:03:06 +04:00
join_dependency Remove defunct ivars 2014-09-28 17:16:56 -07:00
preloader Use bind values for joined tables in where statements 2014-11-01 15:39:51 -06:00
alias_tracker.rb
association.rb reuse available collection? check instead of macro 2014-06-09 19:27:08 -04:00
association_scope.rb Merge pull request #16801 from eileencodes/refactor-scope_chain-on-through-refelction-to-eliminate-branch-in-eval_scope 2014-09-04 11:54:59 -03:00
belongs_to_association.rb add has_one? method and reuse instead of checking macro 2014-06-09 19:12:43 -04:00
belongs_to_polymorphic_association.rb
collection_association.rb make sure cache is not used for collection assocations too 2014-10-14 16:39:57 -07:00
collection_proxy.rb [ci skip] Clarify deletion strategies for collection proxies 2014-10-04 11:36:56 -04:00
has_many_association.rb Don't expose these new APIs yet (added in 877ea78 / #16189) 2014-08-16 23:09:10 -07:00
has_many_through_association.rb edit pass over all warnings 2014-10-28 17:47:32 -07:00
has_one_association.rb remove blank lines in the start of the ActiveRecord files 2014-07-29 02:51:08 +04:00
has_one_through_association.rb
join_dependency.rb measure record instantiation time in AS::Notifications 2014-10-13 14:24:16 -07:00
preloader.rb Updating Associations::Preloader docs 2014-08-17 14:39:20 -04:00
singular_association.rb break cache if we're inside a "scoping" call. fixes #17052 2014-10-14 16:16:29 -07:00
through_association.rb Only merge scopes with zero arity in has_many through 2014-08-20 08:25:58 +03:00