Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. | Jeremy Kemper | 2009-02-03 | 4 | -25/+17 |
| | |||||
* | Fix has_and_belongs_to_many_associations tests. #1738 | Pratik Naik | 2009-01-18 | 1 | -2/+2 |
| | |||||
* | Cache columns for has_and_belongs_to_many associations | lukeludwig | 2009-01-17 | 1 | -0/+11 |
| | | | | | This avoids repeatedly calling SHOW COLUMNS when the association is queried [#1738 state:committed] | ||||
* | Make belongs_to :dependent => :destroy destroy self before associated ↵ | Ben VandenBos | 2009-01-16 | 1 | -1/+2 |
| | | | | | | | | object [#1079 state:resolved] If foreign key constraints are in place then deleteing the associated object first will cause a foreign key violation Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Fix HasManyAssociation#create ignoring the :primary_key option [#1633 ↵ | Roman Shterenzon | 2008-12-27 | 1 | -0/+6 |
| | | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Fix :include of has_one with :primary_key option | Frederick Cheung | 2008-12-26 | 1 | -0/+16 |
| | |||||
* | Fix :include of has_many associations with :primary_key option | Frederick Cheung | 2008-12-26 | 1 | -0/+17 |
| | |||||
* | Preload uses exclusive scope [#643 state:resolved] | Frederick Cheung | 2008-12-26 | 1 | -0/+15 |
| | | | | | | | | | With self referential associations, the scope for the the top level should not affect fetching of associations, for example when doing Person.male.find :all, :include => :friends we should load all of the friends for each male, not just the male friends. | ||||
* | Association preloading no longer stops if it hits a nil object [#1630 ↵ | Pivotal Labs | 2008-12-26 | 1 | -0/+8 |
| | | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Fix configure_dependency_for_has_many not quoting conditions properly [#1461 ↵ | Frederick Cheung | 2008-12-21 | 1 | -0/+13 |
| | | | | state:resolved] | ||||
* | Use explicit order to stop test failing randomly | Frederick Cheung | 2008-12-21 | 1 | -2/+2 |
| | |||||
* | Fix has many through not quoting table names [#1163 state:resolved] | Karthik Krishnan | 2008-12-20 | 1 | -0/+4 |
| | | | | Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Fix preloading of has_one :through associations on belongs_to [#1507 ↵ | Matt Jones | 2008-12-18 | 1 | -1/+16 |
| | | | | | | state:resolved] Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Ensure :include checks joins when determining if it can preload [#528 ↵ | Frederick Cheung | 2008-12-18 | 1 | -0/+65 |
| | | | | state:resolved] | ||||
* | Add missing model files so tests can run isolated [#1506 state:resolved] | Emilio Tagua | 2008-12-18 | 1 | -0/+3 |
| | | | | Signed-off-by: Frederick Cheung <frederick.cheung@gmail.com> | ||||
* | Fix preloading of belongs_to with null foreign key generating useless query ↵ | Frederick Cheung | 2008-12-18 | 1 | -1/+2 |
| | | | | [#1027 state:resolved] | ||||
* | Revert "Fix: counter_cache should decrement on deleting associated records." | Jeremy Kemper | 2008-12-10 | 2 | -34/+0 |
| | | | | | | [#1196 state:open] This reverts commit 05f2183747c8e75c9e8bbaadb9573b4bdf41ecfc. | ||||
* | Fix: counter_cache should decrement on deleting associated records. | Emilio Tagua | 2008-12-10 | 2 | -0/+34 |
| | | | | | | [#1195 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add :having option to find, to use in combination with grouped finds. Also ↵ | miloops | 2008-12-01 | 2 | -0/+10 |
| | | | | | | | added to has_many and has_and_belongs_to_many associations. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1028 state:committed] | ||||
* | Ensure hash conditions on referenced tables are considered when eager ↵ | Paul | 2008-11-26 | 1 | -2/+18 |
| | | | | | | loading with limit/offset. [#1404 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Remove SQL Server cases from tests for latest adapter work to pass rails ↵ | Ken Collins | 2008-11-19 | 1 | -1/+1 |
| | | | | | | expected behavior. Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | fix assignment to has_one :through associations. | Matt Jones | 2008-11-15 | 1 | -1/+39 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Added tests for HABTM associations with counter_sql | Tekin Suleyman | 2008-11-07 | 1 | -0/+23 |
| | | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1102 state:committed] | ||||
* | Skip collection ids reader optimization if using :finder_sql | Jeremy Kemper | 2008-10-23 | 1 | -0/+7 |
| | |||||
* | Ensure association proxy responds to private class methods defined in ↵ | Pratik Naik | 2008-10-16 | 1 | -2/+8 |
| | | | | associated class. [#1083] | ||||
* | Allow class methods to be sent (via #send) to association proxy (fix for bug ↵ | Ian White | 2008-10-16 | 1 | -0/+4 |
| | | | | | | introduced by 691aa20) [#1083] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure methods called on association proxies respect access control. [#1083 ↵ | Pratik Naik | 2008-10-13 | 3 | -0/+30 |
| | | | | state:resolved] [Adam Milligan, Pratik] | ||||
* | Remove the functionality introduce in 28d3390 | Michael Koziarski | 2008-10-10 | 1 | -13/+0 |
| | | | | There are several situations it doesn't cater for, and the inconsistency isn't worth blocking 2.2. | ||||
* | explicitly including child associations that are also included in the parent ↵ | Will Bryant | 2008-10-10 | 1 | -1/+41 |
| | | | | | | | association definition should not result in double records in the collection/double loads (#1110) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1110 state:committed] | ||||
* | Fix has_many :through when the source is a belongs_to association. [#323 ↵ | Zach Dennis | 2008-10-04 | 3 | -1/+26 |
| | | | | | | state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | wrote a test showing eager loading's misbehavior (sanitizing against the ↵ | Will Bryant | 2008-09-29 | 1 | -0/+7 |
| | | | | | | wrong table) when the association has a :conditions hash Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Make AssociationCollection start transactions in the correct database. | Hongli Lai (Phusion) | 2008-09-23 | 3 | -0/+27 |
| | | | | | | | | | | AssociationCollection now starts transactions by calling AssociationCollection#transaction instead of @owner.transaction or @reflection.klass.transaction. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#1081 state:committed] | ||||
* | Association#first and last should not load the association if not needed. ↵ | Jan De Poorter | 2008-09-22 | 2 | -1/+14 |
| | | | | | | [#1091 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | applied patch to fix the associations with blocks in modules bug from an old ↵ | Adeh DeSandies | 2008-09-20 | 1 | -0/+15 |
| | | | | trac ticket | ||||
* | When counting grouped records the target should be loaded to return a valid ↵ | miloops | 2008-09-15 | 1 | -0/+2 |
| | | | | | | | | | groups count result. Without this change count_records will group for the count in the query and return erroneous results. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#937 state:committed] | ||||
* | Support for updating a belongs to association from the foreign key (without ↵ | Jon Leighton | 2008-09-13 | 1 | -0/+13 |
| | | | | | | | saving and reloading the record) Signed-off-by: Michael Koziarski <michael@koziarski.com> [#142 state:committed] | ||||
* | Improve test coverage when using the group option in find, has_many or ↵ | miloops | 2008-09-11 | 2 | -0/+17 |
| | | | | | | has_and_belongs_to_many. Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Fix tests that assumed implicit order by id | Jeremy Kemper | 2008-08-30 | 1 | -2/+2 |
| | |||||
* | Performance: Better query for ASSOCIATION_ids. Select only ids if the ↵ | miloops | 2008-08-30 | 3 | -16/+68 |
| | | | | | | association hasn't been loaded. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support. | Ernie Miller | 2008-08-28 | 1 | -0/+7 |
| | | | | | | [#831 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Implement count limit/offset support for has_many associations | Tarmo Tänav | 2008-08-27 | 1 | -0/+6 |
| | | | | | | [#348 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Alias included associations if needed when doing a count | Tarmo Tänav | 2008-08-27 | 1 | -0/+4 |
| | | | | | | [#302 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix two has_one :through errors | pivotal | 2008-08-27 | 1 | -0/+9 |
| | | | | | | | | * Set the association target on assignment; * Reset target to nil on reset, rather than empty array. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#895 state:committed] | ||||
* | Fix yet another implicit order dependant test | Tarmo Tänav | 2008-08-26 | 1 | -3/+3 |
| | | | | Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | um.. yeah | Jeremy Kemper | 2008-08-26 | 1 | -2/+2 |
| | |||||
* | typo | Jeremy Kemper | 2008-08-26 | 1 | -2/+2 |
| | |||||
* | fix tests relying on implicit ordering | Jeremy Kemper | 2008-08-25 | 1 | -4/+2 |
| | |||||
* | Load the first and not the last has_one result when doing join-based eager ↵ | Tarmo Tänav | 2008-08-25 | 2 | -0/+16 |
| | | | | | | | | | | | loading This matters when the has_one is defined with an order in which case there is an expectation that the first one will be loaded. [#904 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Implement old-skool eagerloading for has_one :through | Frederick Cheung | 2008-08-25 | 1 | -0/+16 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix preloading of has_one through associations | Frederick Cheung | 2008-08-25 | 1 | -5/+9 |
| | | | | | | [#903 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> |