| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
This reverts commit ee439895759b38431ad025f3c234831f30dadcdb.
It would appear that #7661 had unintended consequences to the API. Until
we can sort those out, this should not be in 3.2.x, and wait for 4.0.0.
|
|
|
|
| |
Count returns 0 without querying if parent is not saved
|
|
|
|
| |
Fix collection= on hm:t join models when unsaved
|
| |
|
|
|
|
|
|
|
|
| |
:strict
Conflicts:
activerecord/test/models/person.rb
|
|
|
|
| |
update the records we retrive from the association
|
|
|
|
|
| |
when fetching ids for a collection, bypass preloading
to avoid the unnecessary performance overhead
|
|
|
|
|
|
|
|
|
| |
If a record is removed from a has_many :through, all of the join records
relating to that record should also be removed from the through
association's target.
(Previously the records were removed in the database, but only one was
removed from the in-memory target array.)
|
|
|
|
| |
Fixes #3425.
|
|
|
|
|
| |
Fixes creating records in a through association with a polymorphic source
type.
|
|
|
|
| |
therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556.
|
|
|
|
| |
loaded. Fixes #2054.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
conditions and includes,
when condtions references tables from includes.
Test fail because of invalid sql:
ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: comments.id:
SELECT "posts".id FROM "posts" INNER JOIN "readers" ON "posts"."id" = "readers"."post_id"
WHERE "readers"."person_id" = 1 AND (comments.id is null)
Bug described in github#925
This commit will revert fix from https://github.com/rails/rails/commit/3436fdfc12d58925e3d981e0afa61084ea34736c , but tests is ok.
Bug described in #6569 ticket.
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
|
|
|
| |
validation errors
|
| |
|
|
|
|
| |
better trace without it
|
| |
|
| |
|
|
|
|
| |
and postgresql
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
|
|
| |
This reverts commit 45c233ef819dc7b67e259dd73f24721fec28b8c8.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|
|
|
| |
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/association_preload.rb
activerecord/lib/active_record/associations.rb
activerecord/lib/active_record/associations/class_methods/join_dependency.rb
activerecord/lib/active_record/associations/class_methods/join_dependency/join_association.rb
activerecord/lib/active_record/associations/has_many_association.rb
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/lib/active_record/associations/has_one_association.rb
activerecord/lib/active_record/associations/has_one_through_association.rb
activerecord/lib/active_record/associations/through_association_scope.rb
activerecord/lib/active_record/reflection.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
activerecord/test/cases/associations/has_one_through_associations_test.rb
activerecord/test/cases/reflection_test.rb
activerecord/test/cases/relations_test.rb
activerecord/test/fixtures/memberships.yml
activerecord/test/models/categorization.rb
activerecord/test/models/category.rb
activerecord/test/models/member.rb
activerecord/test/models/reference.rb
activerecord/test/models/tagging.rb
|
| |
| |
| |
| | |
the join record is automatically saved too. This requires the :inverse_of option to be set on the source association in the join model. See the CHANGELOG for details. [#4329 state:resolved]
|
| |
| |
| |
| | |
is a has_many :through with a :primary_key option on the source reflection. [#6376 state:resolved]
|
| |
| |
| |
| | |
... } rather than instance_eval-ing strings
|
| |
| |
| |
| | |
state:resolved]. Also fixed a bunch of other counter cache bugs in the process, as once I fixed this one others started appearing like nobody's business.
|
| |
| |
| |
| | |
historical and practical reasons, :delete_all is the default deletion strategy employed by association.delete(*records), despite the fact that the default strategy is :nullify for regular has_many. Also, this only works at all if the source reflection is a belongs_to. For other situations, you should directly modify the through association.
|
| |
| |
| |
| | |
records in the join table. This is to make the destroy method more consistent across the different types of associations. For more details see the CHANGELOG entry.
|
| |
| |
| |
| | |
hash for the through record, because the creation is done directly on the through association, which will already handle setting the conditions.
|
| |
| |
| |
| | |
[#6257 state:resolved]
|
| |
| |
| |
| | |
belongs_to changes, then the has_many should be considered stale.
|
| |
| |
| |
| | |
is fixed
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
optimisation has too many edge cases, such as when the reflection, source reflection, or through reflection has conditions, orders, etc. [#6153 state:resolved]
This reverts commit 373b053dc8b99dac1abc3879a17a2bf8c30302b5.
Conflicts:
activerecord/lib/active_record/associations.rb
|
| |
| |
| |
| | |
:through with :conditions, with a belongs_to as the source reflection
|
| |
| |
| |
| | |
times should append it to the @target multiple times [#5964 state:resolved]
|
| |
| |
| |
| | |
[#6089 state:resolved]
|
| |
| |
| |
| | |
belongs_to [#2990 state:resolved]
|
| |
| |
| |
| |
| |
| | |
This is additional fix for commit
ebc47465a5865ab91dc7d058d2d8a0cc961510d7 Respect the default_scope on a join model when reading a through association
which otherwise was failing on Oracle (as it returned fixture comments in different order).
|
| |
| |
| |
| | |
goes :through a belongs_to [#2801 state:resolved]
|
| |
| |
| |
| | |
preloaded [#2447 state:resolved]
|
| |
| |
| |
| | |
default_scope on the join model works correctly (creates the join record with the default scope applied)
|
| | |
|
| | |
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
activerecord/CHANGELOG
activerecord/lib/active_record/associations.rb
|
| | |
|
|\|
| |
| |
| |
| |
| | |
Conflicts:
activerecord/lib/active_record/associations/has_many_through_association.rb
activerecord/test/cases/associations/has_many_through_associations_test.rb
|