aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations
Commit message (Collapse)AuthorAgeFilesLines
...
* Revert "Split arel_table into method to get a relation and another to ↵Jeremy Kemper2009-11-132-3/+3
| | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068.
* Split arel_table into method to get a relation and another to memoize the ↵Jeremy Kemper2009-11-132-3/+3
| | | | default relation.
* Ruby 1.9.2: avoid #flattenJeremy Kemper2009-11-131-4/+16
|
* Arel::In -> Arel::Predicates::InJeremy Kemper2009-11-022-2/+2
|
* Merge commit 'rails/master'Emilio Tagua2009-10-131-1/+1
|\
| * Callbacks, DeprecatedCallbacks = NewCallbacks, CallbacksJoshua Peek2009-10-121-1/+1
| |
* | Merge commit 'rails/master'Emilio Tagua2009-10-021-0/+9
|\|
| * Make has_one with :conditions hash scope build or creation of the associated ↵Luciano G Panaro2009-09-281-0/+9
| | | | | | | | | | | | | | object with those conditions Signed-off-by: Michael Koziarski <michael@koziarski.com> [#3088 state:committed]
* | Merge commit 'rails/master'Emilio Tagua2009-09-141-2/+2
|\|
| * Fix habtm associations when using multiple databasessdsykes2009-09-121-2/+2
| | | | | | | | | | | | [#3128] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-09-081-0/+16
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Revert "Assert primary key does not exist in habtm when the association is ↵Jeremy Kemper2009-09-021-0/+16
| | | | | | | | | | | | | | | | | | | | 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-16/+0
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Assert primary key does not exist in habtm when the association is defined, ↵José Valim2009-09-011-16/+0
| | | | | | | | | | | | | | | | instead of doing that everytime a record is inserted. [#3128 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Remove whitespace.Emilio Tagua2009-08-191-2/+2
| |
* | Remove unused quoted_record_ids, now ARel does this using ARel::In.Emilio Tagua2009-08-181-9/+0
| |
* | has_many nullify associations keys using ARel.Emilio Tagua2009-08-181-9/+9
| |
* | habtm insertion with ARel integration.Emilio Tagua2009-08-181-8/+5
| |
* | habtm delete method integrated with ARel.Emilio Tagua2009-08-181-4/+5
| |
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-19/+16
|\|
| * Remove unnecessary scoping for creating hm:t join recordPratik Naik2009-08-101-3/+4
| |
| * Remove unnecessary scoping and validation checks from hm:t#createPratik Naik2009-08-101-1/+1
| |
| * Unify hm:t#create and create! implementationPratik Naik2009-08-101-17/+13
| |
* | Merge commit 'rails/master'Emilio Tagua2009-08-106-6/+34
|\| | | | | | | | | | | | | 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-2/+14
| | | | | | | | | | | | | | | | 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/+4
| | | | | | | | | | | | association creation if join table contains a primary key Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * Fix that counter_cache breaks with has_many :dependent => :nullify.Gabe da Silveira2009-08-091-0/+1
| | | | | | | | | | | | [#1196 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * has_many :through create should not raise validation errorsrailsbob2009-08-091-1/+5
| | | | | | | | | | | | [#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-3/+9
| | | | | | | | 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-101-1/+1
| | | | | | | | | | | | model [#2719 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/+1
| | | | | | | | | | | | 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-1/+1
| | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-0/+4
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/migration.rb
| * Ensure hm:t#create/create! throws ActiveRecord::RecordNotSaved when the ↵Pratik Naik2009-08-081-0/+4
| | | | | | | | owner is new
* | Merge commit 'rails/master'Emilio Tagua2009-07-311-2/+2
|\| | | | | | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Merge docrailsPratik Naik2009-07-251-2/+2
| |
* | Merge commit 'rails/master'Emilio Tagua2009-07-162-5/+27
|\|
| * Add primary_key option to belongs_to associationSzymon Nowak2009-07-152-5/+27
| | | | | | | | | | | | [#765 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Merge commit 'rails/master'Emilio Tagua2009-06-304-28/+16
|\|
| * Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵Pratik Naik2009-07-014-28/+16
| | | | | | | | | | | | | | | | | | 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/+7
|\|
| * Revert "Generate proper :counter_sql from :finder_sql when there is a ↵Yehuda Katz + Carl Lerche2009-06-224-16/+28
| | | | | | | | | | | | | | | | 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-214-28/+16
| | | | | | | | | | | | 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/+7
| | | | | | | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* | Leave the quoting part to ARelEmilio Tagua2009-06-124-165/+169
|\|
| * HasOneThroughAssociation still shouldn't derive from HasManyThroughAssociation.Adam Milligan2009-06-123-160/+164
| | | | | | | | | | | | [#1642 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
| * HasOneAssociation inherits AssociationProxy since it shares nothing with ↵Emilio Tagua2009-06-121-5/+5
| | | | | | | | | | | | | | | | BelongsToAssociation. [#2796 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* | Use ARel in SQL generation through associationsEmilio Tagua2009-06-101-4/+4
|/
* Ensure HasManyThroughAssociation#destroy delete orphan records [#2251 ↵Luca Guidi2009-05-181-0/+7
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* Implement #many? for NamedScope and AssociationCollection using #size [#1500 ↵Chris Kampmeier2009-05-171-0/+9
| | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com>