aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/associations
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'associations_2'Emilio Tagua2009-10-051-1/+1
|\
| * Added eager loading support to Relation and ActiveRecord#all.Emilio Tagua2009-10-051-1/+1
| |
* | Merge commit 'rails/master'Emilio Tagua2009-10-021-0/+18
|\ \
| * | Make has_one with :conditions hash scope build or creation of the associated ↵Luciano G Panaro2009-09-281-0/+18
| | | | | | | | | | | | | | | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed]
* | | Merge commit 'rails/master'Emilio Tagua2009-09-141-0/+9
|\| |
| * | Fix has_one with foreign_key and primary_key association bug which caused ↵Graeme Porteous2009-09-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | the associated object being lost when saving the owner. [#1756 state:resolved] Mixed in a bit from patch by ransom-briggs. [#2813 state:resolved] Signed-off-by: Eloy Duran <eloy.de.enige@gmail.com>
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-1/+1
|\| |
| * | Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-1/+1
| | | | | | | | | | | | | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-2/+14
|\| | | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * | Revert "Assert primary key does not exist in habtm when the association is ↵Jeremy Kemper2009-09-021-2/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | defined, instead of doing that everytime a record is inserted." Test failures on PostgreSQL. [#3128 state:open] This reverts commit da636809daca9c338200811d3590e446f57c8e81.
* | | Merge commit 'rails/master'Emilio Tagua2009-09-011-14/+2
|\| | | |/ |/| | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Assert primary key does not exist in habtm when the association is defined, ↵José Valim2009-09-011-14/+2
| | | | | | | | | | | | | | | | instead of doing that everytime a record is inserted. [#3128 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Use finder options as relation method names to provide more familiarEmilio Tagua2009-08-181-5/+5
| | | | | | | | | | naming. Use bang methods convention in methods that alter the relation.
* | Merge commit 'rails/master'Emilio Tagua2009-08-171-1/+1
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb
| * Fix test_has_many_through_polymorphic_has_one on sqlite2 [#3054 state:resolved]Jay Pignata2009-08-151-1/+1
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge commit 'rails/master'Emilio Tagua2009-08-111-0/+18
|\|
| * Add tests for hm:t#push failuresPratik Naik2009-08-111-0/+18
| |
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-12/+8
|\|
| * Rewrite hm:t#create tests using assert_no_difference and assert_differencePratik Naik2009-08-101-12/+8
| |
* | Merge commit 'rails/master'Emilio Tagua2009-08-106-25/+171
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
| * raises an exception on habtm join table inserts if join table contains a ↵Jaime Bellmyer2009-08-091-1/+12
| | | | | | | | | | | | | | | | primary key. Caches this check to save time on subsequent inserts. [#2086 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * raises exception (ActiveRecord::ConfigurationError with message) on habtm ↵Jaime Bellmyer2009-08-091-0/+45
| | | | | | | | | | | | association creation if join table contains a primary key Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Fix test dependency on taggingsJeremy Kemper2009-08-091-1/+2
| |
| * Fix that counter_cache breaks with has_many :dependent => :nullify.Gabe da Silveira2009-08-092-3/+28
| | | | | | | | | | | | [#1196 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * has_many :through create should not raise validation errorsrailsbob2009-08-091-1/+28
| | | | | | | | | | | | [#2934 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Allow ho:through#build when the owner is a new record [#1749 state:resolved]Tristan Dunn2009-08-101-0/+10
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Enable has_many :through for going through a has_one association on the join ↵Gabe da Silveira2009-08-103-2/+14
| | | | | | | | | | | | model [#2719 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Removed duplicated tests [#3026 state:resolved]Arthur Zapparoli2009-08-101-18/+0
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Make sure association conditions work with :include and :joins [#358 ↵Vladimir Meremyanin2009-08-091-0/+6
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Added back support for destroying an association's object by id. [#2306 ↵Joshua Nichols2009-08-091-0/+22
| | | | | | | | | | | | status:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
| * Ensure hm:t#find does not assign nil to :include [#1845 state:resolved]railsbob2009-08-091-0/+5
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-0/+7
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/migration.rb
| * Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the ↵Pratik Naik2009-08-081-0/+7
| | | | | | | | owner is new
* | Merge commit 'rails/master'Emilio Tagua2009-08-085-46/+63
|\| | | | | | | | | | | Conflicts: activerecord/test/cases/adapter_test.rb activerecord/test/cases/method_scoping_test.rb
| * added :order option to find :first methods and associations as otherwise ↵Raimonds Simanovskis2009-08-065-46/+63
| | | | | | | | | | | | | | | | Oracle tests were failing Oracle stores '' string as NULL Oracle cannot have identifiers larger than 30 characters added missing fixtures to test setup method
* | More work on removing plain SQL from associations and use ARel instead.Emilio Tagua2009-08-071-4/+4
| |
* | Don't use local vars before testing its conditional.Emilio Tagua2009-08-031-2/+0
| |
* | Merge commit 'rails/master'Emilio Tagua2009-07-161-0/+98
|\|
| * Add primary_key option to belongs_to associationSzymon Nowak2009-07-151-0/+98
| | | | | | | | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-07-141-2/+6
|\|
| * Optimize <association>_ids for hm:t with belongs_to sourcePratik Naik2009-07-131-2/+6
| |
* | Merge commit 'rails/master'Emilio Tagua2009-06-302-0/+12
|\|
| * Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-012-0/+12
| | | | | | | | | | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question.
* | Merge commit 'rails/master'Emilio Tagua2009-06-231-0/+6
|\|
| * Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-222-10/+0
| | | | | | | | | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql.
| * Generate proper :counter_sql from :finder_sql when there is a newline ↵Patrick Joyce2009-06-212-0/+10
| | | | | | | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
| * Ensure hm:t#create respects source associations hash conditions [#2090 ↵mattbauer2009-06-211-0/+6
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge commit 'rails/master'Emilio Tagua2009-06-022-3/+3
|\| | | | | | | | | | | Conflicts: activerecord/lib/active_record.rb
| * Merge branch 'master' into active_modelJoshua Peek2009-05-297-38/+420
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: activemodel/lib/active_model/core.rb activemodel/test/cases/state_machine/event_test.rb activemodel/test/cases/state_machine/state_transition_test.rb activerecord/lib/active_record/validations.rb activerecord/test/cases/validations/i18n_validation_test.rb activeresource/lib/active_resource.rb activeresource/test/abstract_unit.rb
| | * Break up DependencyModule's dual function of providing a "depend_on" DSL and ↵Joshua Peek2009-05-281-1/+1
| | | | | | | | | | | | "included" block DSL into separate modules. But, unify both approaches under AS::Concern.