composite_primary_keys 12.0.5 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +883 -862
  3. data/README.rdoc +181 -180
  4. data/lib/composite_primary_keys.rb +119 -118
  5. data/lib/composite_primary_keys/active_model/attribute_assignment.rb +19 -19
  6. data/lib/composite_primary_keys/associations/association_scope.rb +66 -68
  7. data/lib/composite_primary_keys/associations/join_dependency.rb +118 -103
  8. data/lib/composite_primary_keys/attribute_methods.rb +21 -9
  9. data/lib/composite_primary_keys/attribute_methods/primary_key.rb +0 -2
  10. data/lib/composite_primary_keys/attribute_methods/read.rb +30 -30
  11. data/lib/composite_primary_keys/attribute_methods/write.rb +35 -35
  12. data/lib/composite_primary_keys/base.rb +141 -141
  13. data/lib/composite_primary_keys/connection_adapters/abstract/database_statements.rb +37 -22
  14. data/lib/composite_primary_keys/connection_adapters/sqlserver/database_statements.rb +44 -44
  15. data/lib/composite_primary_keys/core.rb +48 -48
  16. data/lib/composite_primary_keys/nested_attributes.rb +1 -1
  17. data/lib/composite_primary_keys/persistence.rb +82 -81
  18. data/lib/composite_primary_keys/reflection.rb +91 -29
  19. data/lib/composite_primary_keys/relation.rb +197 -193
  20. data/lib/composite_primary_keys/relation/batches.rb +16 -8
  21. data/lib/composite_primary_keys/relation/calculations.rb +104 -81
  22. data/lib/composite_primary_keys/relation/finder_methods.rb +235 -235
  23. data/lib/composite_primary_keys/relation/predicate_builder/association_query_value.rb +39 -20
  24. data/lib/composite_primary_keys/relation/query_methods.rb +42 -42
  25. data/lib/composite_primary_keys/relation/where_clause.rb +18 -23
  26. data/lib/composite_primary_keys/table_metadata.rb +11 -0
  27. data/lib/composite_primary_keys/version.rb +8 -8
  28. data/test/abstract_unit.rb +114 -114
  29. data/test/connections/databases.ci.yml +22 -19
  30. data/test/fixtures/db_definitions/db2-create-tables.sql +112 -112
  31. data/test/fixtures/db_definitions/db2-drop-tables.sql +16 -16
  32. data/test/fixtures/db_definitions/mysql.sql +180 -180
  33. data/test/fixtures/db_definitions/oracle.drop.sql +41 -41
  34. data/test/fixtures/db_definitions/oracle.sql +199 -199
  35. data/test/fixtures/db_definitions/postgresql.sql +182 -182
  36. data/test/fixtures/db_definitions/sqlite.sql +169 -169
  37. data/test/fixtures/db_definitions/sqlserver.sql +176 -176
  38. data/test/fixtures/department.rb +16 -16
  39. data/test/fixtures/departments.yml +19 -15
  40. data/test/fixtures/employees.yml +33 -28
  41. data/test/fixtures/restaurants_suburbs.yml +10 -10
  42. data/test/fixtures/streets.yml +16 -16
  43. data/test/fixtures/suburbs.yml +14 -14
  44. data/test/fixtures/user.rb +11 -11
  45. data/test/test_associations.rb +364 -358
  46. data/test/test_attributes.rb +75 -60
  47. data/test/test_calculations.rb +49 -42
  48. data/test/test_create.rb +218 -180
  49. data/test/test_delete.rb +182 -179
  50. data/test/test_exists.rb +39 -39
  51. data/test/test_find.rb +170 -157
  52. data/test/test_ids.rb +112 -112
  53. data/test/test_nested_attributes.rb +67 -67
  54. data/test/test_update.rb +96 -96
  55. metadata +5 -5
  56. data/lib/composite_primary_keys/connection_adapters/mysql/database_statements.rb +0 -24
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b2a0ca9aa38fb1dfdca5c0974049eec9faf2c5703666a8e8de2ad28f6c78c7bc
4
- data.tar.gz: 6384ddd8291fbd65e074965bfb70b8945c4ac6b556537973cc62561a86a0c609
3
+ metadata.gz: fa8acb9d77d6a2de529283cbaa0cbea67daec08813942c8bfa83f39b0bdf299f
4
+ data.tar.gz: deb46f06053d8a07b19903a46b3d30e3ae82699d265f339c5463e810900416b6
5
5
  SHA512:
6
- metadata.gz: 3c8a87f9676da79d514cd3dd2b21d7c1b523ddde1e13a2b37484e69ed4d93556e94fd725bc41642117338de66679932b69aff077c90c6c45d2026792439f4d5a
7
- data.tar.gz: 5e393c7b725a757bef1a5b99efb9ef62612e3d11b7aa8dec15399684221a6a75f1b34908434b1471a0bc86a67814e7e387905d6e92885f7dddefb521668a7f9b
6
+ metadata.gz: d31a495089eafc1cced865e0cd55e6e7a09698b124f30c7d18a754aa396c611f85abcfcf32af55e5c23534432d0f74c7eee5f1d674574c0a0b0c937d61fb16fd
7
+ data.tar.gz: ab7776729d53de9d12c08bb0035c256ef1d4cc00dab2b7be029a4c610c6cd36b6e1397160ebde56d7acaecc29817b1456e83b482a6a7f33c0a5ac15c6ba715e2
data/History.rdoc CHANGED
@@ -1,862 +1,883 @@
1
- == 12.0.5 (2020-12-31)
2
- * Finally issue with SQLServer when tables are marked as exclude_output_inserted. See #535. (Charlie Savage)
3
-
4
- == 12.0.4 (2020-12-30)
5
- * Fix compatibility with Ruby Ruby 2.6 and below (ta1kt0me)
6
- * Finally get SQLServer mass updates and deletes working (Charlie Savage)
7
- * Fix MySQL mass updates and deletes that were broken by 12.0.3 (Charlie Savage)
8
-
9
- == 12.0.3 (2020-11-11)
10
- * Prevents infinite loops with gems which modify the 'attributes' method (Nicholas Guarino)
11
- * Improve delete_all and update_all queries (Charlie Savage)
12
- * Improve Oracle support (Charlie Savage)
13
- * Improve SQL Server support. Note delete_all and update_all queries still do not work due to
14
- quirks in SQL Server syntax (Charlie Savage)
15
- * Improve support for polymorphic associations (Charlie Savage)
16
- * Update fixtures and tests to include a model that uses an :id column as part of a composite
17
- key (Charlie Savage)
18
- * Fixed bug where id values were not correctly mapped between primary and foreign keys in associations (Charlie Savage)
19
- * Cleanup how the gem is loaded (Charlie Savage)
20
- * Remove older, unused or minimally used fixtures (Charlie Savage)
21
-
22
- == 12.0.2 (2020-05-19)
23
- * Remove deprecation warning for Ruby 2.7 due to keyword parameters (Alexandru Anca )
24
- * Use sqlite for default in tests (Charlie Savage)
25
- * Modernize gem tests by using Bundler (Charlie Savage)
26
- * Update travis for ruby 2.7 (Charlie Savage)
27
- * Port "Fix create record where one or more of the primary keys has a default value" from ar 5.2 branch (Charlie Savage)
28
- * Remove extra argument from sql_for_insert for SqlServer (tohae)
29
-
30
- == 12.0.1 (2019-11-25)
31
- * Convert attribute names to strings before checking for them in has_attribute? (Daniel de Haas)
32
- * Update the comment referring to the overridden Rails code (Daniel de Haas)
33
-
34
- == 12.0.0 (2019-09-03)
35
- * Update to ActiveRecord 6.0 (Hiroshi Kajisha, Alexandru Anca, Charlie Savage, Sammy Larbi)
36
- * Update travis setup (Olle Jonsson, Charlie Savage)
37
-
38
- ==11.3.1 (2020-04-01)¶ ↑
39
- * Fix overriding AbstractReflection for activerecord 5.2.4 (Sergey Semyonov)
40
- * Fix handling CPK with fields containing comma (Sergey Semyonov)
41
- * Fixed incorrect SQL condition for joining by CPK (Sergey Semyonov)
42
- * Update travis.yml file (Sergey Semyonov)
43
- * Add tests for composite keys with default values (Daniel Wiklund)
44
- * Fix create record where one or more of the primary keys has a default value (Daniel Wiklund)
45
-
46
- == 11.2.0 (2019-03-16)
47
- * When creating new records, honor composite key autoincrementing fields if possible (Antti Pitkänen)
48
- * Update Association#run to more closely match ActiveRecord (Fabian Mersch)
49
- * Updates needed due to changes in ActiveRecord (Sammy Larbi)
50
- * Fix construct_join_attributes method (Brad Slaughter)
51
- * Fix destroy_all on HABTM (Brad Slaughter)
52
-
53
- == 11.1.0 (2018-11-14)
54
- * Support ActiveRecord 5.2.1 (S1Artem Tselovalnikov, Caleb Buxton, Charlie Savage)
55
- * Fix counter cache (Tomonori Murakami)
56
- * Fix error on autosave has_one relations when the :primary_key option is set (Charlie Savage)
57
-
58
- == 11.0.3 (2018-06-25)
59
- * Fix overridden attribute readers and writers (Charlie Savage)
60
-
61
- == 11.0.2 (2018-06-24)
62
- * Remove no longer needed overrides (Charlie Savage)
63
-
64
- == 11.0.1 (2018-06-20)
65
- * Fix in_batches (Urmo Rae)
66
- * Fix apply_join_dependency (Charlie Savage)
67
-
68
- == 11.0.0 (2018-06-18)
69
- * Update to ActiveRecord 5.2 (Charlie Savage)
70
- * Fixes for AR 5.2 persistence changes (Erik Rothoff, Charlie Savage)
71
- * Fix system stack error (i2bskn)
72
-
73
- == 11.0.0.rc2 (2018-02-25)
74
-
75
- * Fix mysql deletion failure (Charlie Savage)
76
- * Clean test run for postgresql, mysql and sqlite3 (Charlie Savage)
77
-
78
- == 11.0.0.rc1 (2018-02-25)
79
-
80
- * Update to ActiveRecord 5.2.rc1 (Charlie Savage)
81
- * Fix uniquness check (Charlie Savage)
82
-
83
- == 11.0.0.beta4 (2018-01-08)
84
-
85
- * Try again on Calculations#execute_simple_calculation for ActiveRecord 5.2.beta2 (Charlie Savage)
86
-
87
- == 11.0.0.beta3 (2018-01-07)
88
-
89
- * Fix typo in Readme.doc (Lopez Lucien)
90
- * Fix Calculations#execute_simple_calculation for ActiveRecord 5.2.beta2 (Charlie Savage)
91
-
92
- == 11.0.0.beta2 (2017-12-10)
93
-
94
- * Minor updates for ActiveRecord 5.2.beta2 support (Charlie Savage)
95
-
96
- == 11.0.0.beta1 (2017-12-03)
97
-
98
- * ActiveRecord 5.2.beta2 support (Charlie Savage)
99
-
100
- == 10.0.5 (2018-06-24)
101
- * Fix in_batches (Urmo Rae)
102
-
103
- == 10.0.4 (2018-06-17)
104
-
105
- * Lock mysql2 gem to 0.4.x (Le Trung Kien)
106
- * Set inversion when using preload (Le Trung Kien)
107
- * Fixes for AR 5.1.6 (Tim Morgan)
108
-
109
- == 10.0.3 (2018-02-25)
110
-
111
- * Require a minimum of activerecord version 5.1.5 (Tom Hughes)
112
-
113
- == 10.0.2 (2017-12-02)
114
-
115
- * Fix frozen string mutation for mysql (Sergey Sein)
116
- * Fix autosave for belongs_to associations (Fabian Mersch)
117
- * Require a minimum of activerecord version 5.1.4 (Charlie Savage)
118
-
119
- == 10.0.1 (2017-10-08)
120
-
121
- * Fixed an error that happened when a table attribute had the same name as the table (Taishi Kasuga)
122
-
123
- == 10.0.0 (2017-10-08)
124
-
125
- * Support ActiveRecord 5.1.x (Pinak Thakkar, Jordan Owens)
126
- * Fix Paper Trail compatibility (Sean Linsley)
127
- * Fix typo in Readme (Mike Gunderloy)
128
- * Improved sql server support (Artyom Nikolaev)
129
-
130
- == 9.0.10 (2018-06-24)
131
-
132
- * Fix AR 5.0.7 (Jordan Owens)
133
-
134
- == 9.0.8 (2017-10-11)
135
-
136
- * Fix Paper Trail compatibility (Sean Linsley)
137
-
138
- == 9.0.7 (2017-05-22)
139
-
140
- * Update sqlite3 to support deletes and updates (Charlie Savage)
141
- * Specify version for sql server gem so it works with Rails 5.0 (Charlie Savage)
142
- * Use `datetime` datatype to address Invalid default value for updated_at (Yasuo Honda)
143
- * Fix ORA-00900 error when it attempts to execute blank statement (pustomytnyk)
144
- * Override ActiveRecord::Associations::CollectionAssociation#ids_reader (pustomytnyk)
145
- * Only define #primary_keys if #primary_keys=(value) is called (Charlie Savage)
146
- * Change `timestamp` to `datetime` for MySQL as ActiveRecord timestamps type does (Oriol Collel)
147
- * Fix incorrect case statement to get PK for SQLServer (Oriol Collel)
148
- * Fixes random failures in test_preload_of_polymorphic_association (Boris Peterbarg)
149
-
150
- == 9.0.6 (2017-01-08)
151
-
152
- * Uncomment tests (Sammy Larbi)
153
- * Update readme (Charlie Savage)
154
-
155
- == 9.0.5 (2017-01-02)
156
-
157
- * Don't nest PK twice when looking up id, fixes #319 (Kerey Roper)
158
- * Simplify database setup for tests (Charlie Savage)
159
- * Revamp gem management (Charlie Savage)
160
- * Add support for Relation#update_all when using joins (Charlie Savage)
161
- * Add erb support to test database.yml files (Charlie Savage)
162
- * Sqlserver fixes for ordering (Charlie Savage)
163
- * Sqlserver refresh (Charlie Savage)
164
- * Oracle refresh (Charlie Savage)
165
- * Fix delete_all for MySql (Charlie Savage)
166
- * Added test cases for preloading associations with and without conditions (Martin Körner)
167
- * Revamp single association handling to correctly setup SQL binds (Charlie Savage)
168
- * Remove references to ActiveModel - #352 (Charlie Savage)
169
- * Fixes for #232, #359, #367 and #371 (Charlie Savage)
170
-
171
- == 9.0.4 (2016-08-17)
172
- * Do not set associations to readonly. See https://github.com/rails/rails/issues/24093 (Charlie Savage)
173
-
174
- == 9.0.2 (2016-08-10)
175
- * Fix delete_all when used with a join (Charlie Savage)
176
-
177
- == 9.0.1 (2016-07-27)
178
- * Create OR predicates in a nicely balanced tree fixing #320 (Nathan Samson)
179
-
180
- == 9.0.0 (2016-07-06)
181
- * Support connection_specification_name in rails5.0.0.rc1 (pocari)
182
-
183
- == 9.0.0.beta1 (2016-04-16)
184
- * Rails 5 beta support (Sammy Larbi)
185
-
186
- == 8.1.7 (2019-05-04)
187
-
188
- Fix key not being an array in subquery on has_many :through (Eric Proulx)
189
- Convert batches to arrays before continuing loop (Jeremy Mickelson)
190
-
191
- == 8.1.6 (2017-05-20)
192
-
193
- Query cache with bind params (ttw)
194
- Fix TestIds#test_set_ids_string. Sqlite's serial and integer are a bit different (Boris Peterbarg)
195
- Associations with inverse fix (Boris Peterbarg)
196
- Fix save_has_one_association and add a test for it (Boris Peterbarg)
197
- Fix save_belongs_to_association override (Boris Peterbarg)
198
- Extend approach from #344 to fix autosave for has_one associations as well (Cameron Finucane)
199
-
200
- == 8.1.5 (2017-01-01)
201
-
202
- * Don't nest PK twice when looking up id, fixes #319 (Kerey Roper)
203
-
204
- == 8.1.4 (2016-07-27)
205
-
206
- * Create OR predicates in a nicely balanced tree fixing #320 (Nathan Samson)
207
- * Fix find in batches (apurvis)
208
-
209
- == 8.1.3 (2016-04-16)
210
-
211
- * Make CPK work for Arel::Attributes::Attribute (Rick Xing)
212
- * Change autosave_association.rb so that association autosave can work (Rick Xing)
213
- * Fix exception when saving "other_ids=" with a has_many :through association where the source
214
- association is polymorphic (Tye Shavik)
215
- * Fix Arel::Nodes::In where left side is not a column (Tye Shavik)
216
-
217
- == 8.1.2 (2015-12-13)
218
-
219
- * Fix failing tests
220
-
221
- == 8.1.1 (2015-08-04)
222
-
223
- * Updates to make Travis CI green (Laust Rud Jacobsen)
224
- * Travis CI support (Laust Rud Jacobsen)
225
- * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
226
- for non-peristed objects (Charlie Savage)
227
- * Update support for Uniquenes validations (Avi Leavitt)
228
- * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
229
- * Aligned the establish connection paramater handling to be similar to latest version of rails (Harish Shetty)
230
-
231
-
232
- == 8.1.0 (2014-03-23)
233
-
234
- * ActiveRecord 4.2.1 support (Charlie Savage)
235
- * Change parsing of composite ids to fix #290 (Charlie Savage)
236
- * Add sqlserver setting for test suite (Joachim Herb)
237
- * Fix sqlserver adapater, isse #224 (Joachim Herb)
238
- * Update readme file to include version 8.* information (David Silva)
239
-
240
- == 8.0.1 (2014-01-24)
241
-
242
- * Support optimistic lock and lock_version added to existing fixtures (Kirika)
243
-
244
- == 8.0.0 (2014-01-10)
245
-
246
- * ActiveRecord 4.2.* support (Sammy Larbi)
247
-
248
- == 7.0.14 (2015-08-04)
249
-
250
- * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
251
- for non-peristed objects (Charlie Savage)
252
- * Update support for Uniquenes validations (Avi Leavitt)
253
- * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
254
-
255
- == 7.0.13 (2015-01-24)
256
-
257
- * Support optimistic lock and lock_version added to existing fixtures (Kirika)
258
- * README change to convey finding available versions (Aaron Bartell)
259
- * Fixes indentation in product_tariffs (Zaldabus)
260
-
261
- == 7.0.12 (2014-11-09)
262
-
263
- * ActiveRecord 4.1.7 support (Tom Hughes)
264
- * Extract CPK methods to its own module and extending instead of opening the singleton class
265
- which fixes Marshal#dump (Nicolás Hock Isaza)
266
-
267
- == 7.0.11 (2014-10-10)
268
-
269
- * ActiveRecord 4.1.6 support (Tom Hughes, Charlie Savage)
270
- * Verify MariaDB support and update docs (Isi Robayna)
271
- * Postgresql binary column support (Piotr Gębala)
272
- * Fix deleting of records from collection association (akeuk and Charlie Savage)
273
- * Fix invalid include (shiro16)
274
- * Improve tests (Yann Marquet)
275
-
276
- == 7.0.10 (2014-08-07)
277
-
278
- * Update attribute dirty methods to allow attribute *_was
279
- fields to be calculated correctly for enum fields (Zachary Salzbank)
280
- * Update read/write methods to match latest version of ActiveRecord (Charlie Savage)
281
-
282
- == 7.0.9 (2014-08-03)
283
-
284
- * Second attemp at fixing instantiation of has_many records via :includes that use composite keys - this
285
- time take into account no target records (Charlie Savage)
286
-
287
- == 7.0.8 (2014-08-03)
288
-
289
- * Fix instantiation of has_many records via :includes that use composite keys (Charlie Savage)
290
-
291
- == 7.0.7 (2014-07-29)
292
-
293
- * Add back support for calling find like this (Sammy Larbi):
294
-
295
- Membership.find('1,1')
296
-
297
- == 7.0.7 (2014-07-29)
298
-
299
- * Add back support for calling find like this (Sammy Larbi):
300
-
301
- Membership.find('1,1')
302
-
303
- == 7.0.6 (2014-07-22)
304
-
305
- * Change the way we override ActiveRecord::Persistence to call sequence of included modules such
306
- as callbacks (Charlie Savage)
307
-
308
- == 7.0.5 (2014-07-21)
309
-
310
- * Remove overriden Postgresql adapter code (Charlie Savage)
311
-
312
- == 7.0.4 (2014-07-09)
313
-
314
- * Fix overriding of Relation#where_values_hash (Pavel)
315
- * Add travis CI support (Pavel)
316
- * Run AR's original relation_for_destroy when primary key is not composite (Pavel)
317
-
318
- == 7.0.3 (2014-07-04)
319
-
320
- * Fixes for Rails 4.1.2+ compatibility (Tom Hughes)
321
- * Nested attribute fix (Sammy Larb)
322
- * Test fixes (Sammy Larb)
323
- * Fixes instantiating join records (Charlie Savage)
324
-
325
- == 7.0.2 (2014-06-01)
326
-
327
- * Fix id_was when one of the column names is called id (Adrian Hooper)
328
- * Fix queries that use ActiveRecord objects in the where clause (Adrian Hooper)
329
-
330
- == 7.0.1 (2014-05-27)
331
-
332
- * Fix setting of timestamps automatically by Rails (Charlie Savage)
333
-
334
- == 7.0.0 (2014-05-26)
335
-
336
- * Active Record 4.1 support! (Charlie Savage, Tom Hughes, Simon South)
337
-
338
- Note there is one big api change. Previously, CPK supported both of these calls:
339
-
340
- Membership.find(1,1)
341
- Membership.find([1,1])
342
-
343
- The first one no longer works. It was removed because it made the internal code simpler
344
- and makes the intention of the code clearer (especially when finding multiple records).
345
- If this change causes too much pain then please submit a ticket on Github.
346
-
347
- == 6.0.08 (2015-01-24)
348
-
349
- * Fix habtm association #delete_records (Uros Jurglic)
350
- * Support optimistic locking (Toshio Maki)
351
- * Remove singleton classes on CPK relations (Nicolás Hock Isaza)
352
-
353
- == 6.0.7 (2014-10-06)
354
-
355
- * Support Rails 4.0.6 (Tom Hughes)
356
-
357
- == 6.0.6 (2014-05-26)
358
-
359
- * Don't refer to deprecated set_primary_keys in README (Henare Degan)
360
- * Fix gemspec dependency (Charlie Savage)
361
-
362
- == 6.0.5 (2014-05-20)
363
-
364
- * Removed debugging output (Dan Draper)
365
- * Fixes to ensure that has_one associations work correctly (Dan Draper)
366
- * Fix postgres db migration failure since no result is returned in some cases (seashell-qd)
367
- * Fix exception raised in method "id=" (seashell.qd@hotmail.com)
368
-
369
- == 6.0.3 (2014-04-28)
370
-
371
- * Fixes setting of primary key when CPK is not used for a given model (see #191)
372
-
373
- == 6.0.2 (2014-04-28)
374
-
375
- * Fixes relating to ActiveRecord 4.0.x compatibility (Dan Draper)
376
- * Ensure that primary key is set on instance when creating new records (Dan Draper)
377
-
378
- == 6.0.1 (2013-11-29)
379
-
380
- * Handle records == :all in HasManyAssociation#delete_records. Without this calling
381
- delete or clear on a has_many assocation can result in an exception (Tom Hughes)
382
- * Don't include cpk key as an attributes - fixes json serialization - #168 (Charlie Savage)
383
- * Fix tests running on ruby 1.9.3 (Charlie Savage)
384
- * Update nested_attributes to work with activerecord 4.0.x (Nick DeLuca)
385
-
386
- == 6.0.0 (2013-08-04)
387
- * ActiveRecord 4.0 support (Sammy Larbi)
388
-
389
- == 5.0.13 2013-04-27
390
- * Batch query improvements (Jordan Byron)
391
- * Support nested attributes (aiasfina and Charlie Savage)
392
-
393
- == 5.0.12 2013-01-21
394
- * Fix HasManyAssociation foreign_key_present? method to work with non CPK assocations (Charlie Savage)
395
-
396
- == 5.0.11 2013-01-19
397
- * Patch HasManyAssociation foreign_key_present? method to work with array of keys (tbeauvais)
398
- * Patch reverse_sql_order method to break apart CPKs (tbeauvais)
399
- * Add test and fix for nested_attributes update (Dinshaw Gobhai)
400
- * Add test and fix for to_sym exception (Dinshaw Gobhai)
401
- * Add missing timestamp columns for mysql test_touch.rb (Dinshaw Gobhai)
402
-
403
- == 5.0.10 2012-11-21
404
- * ActiveRecord 3.2.9 compatability (Tom Hughes, Chris Heald, Jack Tang)
405
- * Add support for find_in_batches (Charlie Savage)
406
- * Add support for touch method (Macario Ortega)
407
- * Remove symbolized representation of primary keys to be consistent with ActiveRecord (Tiago Cardoso)
408
- * Update destroy method to use hash of primary keys over an array. This allows the proper SQL
409
- (using IS NULL) to be generated when one of the primary key attributes is nil (Scott Hunter).
410
-
411
- == 5.0.9 2012-09-29
412
- * Enable tests for MS SQL Servder (Enderson Maia)
413
- * Update ActiveRecord::Base#initialize_dup override in line with ActiveRecord::Base 3.2.5+ (Lucas Maxwell)
414
- * Require postgresql_adapter.rb also when using activerecord-postgis-adapter (Torsti Schulz)
415
- * Make cpk_in_predicate build a simple IN when possible (Tom Hughes)
416
- * Fixed problem loading jdbcpostgresql adapter (Troy Caldwell)
417
- * Add support for counter cache (Charlie Savage)
418
- * Fix recreating postgresql database (Charlie Savage)
419
- * Update dependency to ActiveRecord 3.2.8 or higher (Charlie Savage)
420
-
421
- == 5.0.8 2012-07-01
422
- * Enabled tests for MS SQL Server (Enderson Maia)
423
- * Update establish_connection to work with Rails 3.2.6 (Ivan Schneider)
424
- * Fix typos in rake tasks names in README_tests.rdoc (Ivan Schneider)
425
- * Fix problem with deleting non-CPK in Rails 3.2.5 (Sammy Larbi)
426
- * Fixes relationship deletion for HABTM in Rails when it passes :all flag instead of
427
- an array of IDs. Also adds new tests and test fixtures (Sammy Larbi)
428
- * Change mysql db creation to execute one statement each time, since in some setups
429
- it will not run multiple statements (Sammy Larbi)
430
- * Fix multiple assignments to same column due to duplicate keys in @changed_attributes.
431
- Includes test fixes (Jan Vlnas)
432
-
433
- == 5.0.7 2012-06-03
434
- * Fixed bug where validates_uniqueness failed for 3 or more primary keys. (Charlie Savage)
435
-
436
- == 5.0.6 2012-05-20
437
- * Fixed bug where setting a belongs_to association to nil would raise an error (Tyler Rick)
438
- * Remove special case code for 1 column selects and just choose to use Rails version of the
439
- method unless we need ours to deal with an Array (Sammy Larbi)
440
- * Change count tests to actually check for distinct, fix resulting error it
441
- demonstrated in the code (Sammy Larbi)
442
- * Specify mysql2 driver by default (Charlie Savage)
443
- * Update sqlite tests to run on Windows (Charlie Savage)
444
-
445
- == 5.0.5 2012-05-05
446
- * Count without slower subquery in cases where that is possible (Sammy Larbi)
447
- * When you call association.build for a has_many association that uses a
448
- composite foreign key, the newly built child record should have the values
449
- in its belongs_to foreign_key populated from its owner's values (Tyler Rick).
450
- * Removed test_has_many_with_primary_key method that wasn't being used because
451
- another method by the same name was defined below it (Tyler Rick).
452
- * Fixed a bug that was causing object.changes to raise TypeError (Tyler Rick)
453
- * Fix error when running rake mysql:rebuild_databases (Tyler Rick)
454
- * to_param should join with comma instead of minus sign (Tsutomu Kuroda)
455
- * Fix the "Factories" section of README.rdoc (Tsutomu Kuroda)
456
-
457
- == 5.0.4 2012-03-23
458
- * Update ActiveRecord::AttributeMethods#Write for Rails 3.2.2 (Travis Warlick)
459
-
460
- == 5.0.4 2012-03-23
461
- * Yanked
462
-
463
- == 5.0.2 2012-03-16
464
- * Use .rdoc extension on RDoc files (Elia Schito)
465
- * Update documentation to use self.primary_keys instead of set_primary_keys (Miguel Fonseca)
466
- * Added tests for comparing composite ids (Jim Jones)
467
- * Updating the README for clarity (Brett Fishman)
468
- * Fix method signature mismatch with active_record (Miguel Fonseca)
469
- * Fix ref in README (Elia Schito)
470
- * Add test for habm create (Charlie Savage)
471
-
472
- == 5.0.1 2012-02-13
473
- * Fix deprecation warning that was exactly backwards (Tom Hughes)
474
- * Fix primary_keys handling in models that inherit from other models
475
- but don't redefine their primary_key. Problem was the inherited
476
- models didn't correctly reference their parents primary_keys (Charlie Savage)
477
-
478
- == 5.0.0 2012-02-12
479
- * Fix tests so they pass on MySql (Charlie Savage)
480
- * Fix calculations to work with duplicate column names (cleesmith)
481
- * Switch rake tasks for Postgresql and MySql to use ActiveRecord API for
482
- creating and dropping databases (Charlie Savage)
483
- * Follow AR 3.2 lead and introduce self.primary_keys and deprecate set_primary_keys (Charlie Savage)
484
- * Switch from set_primary_key to self.primary_key= to avoid Rails deprecation (Charlie Savage)
485
- * Fix issue when using multiple database connections (David Doan)
486
- * Fix homepage in gemspec and remove email address (Charlie Savage)
487
- * Add support for string keys to exists? (Jan Vlnas)
488
- * Fix typo (Jason Karns)
489
-
490
- == 5.0.0.rc1 2012-01-16
491
- * ActiveRecord 3.2 support
492
-
493
- == 4.1.2 2012-01-12
494
- * Helper to allow the same tests to be used for both Oracle and other DBs
495
- by replacing quoted identifiers with all-caps equivalents on Oracle (Rhett Sutphin)
496
- * Update Oracle tests (Rhett Sutphin)
497
-
498
- == 4.1.1 2011-08-31
499
- * Support for AR 3.1.1
500
- * Make polymorphic belongs_to work in rails 3.1.1 (Tom Hughes)
501
- * Eliminate relative paths from the test suite (Rhett Sutphin)
502
- * Minor improvements to the CPK test runner w/o relative path changes (Rhett Sutphin)
503
- * Remove stray puts (Rhett Sutphin)
504
- * Allow AR logs to go to a file when running tests. This commit allows you to
505
- specify a file to use instead via the CPK_LOGFILE environment variable.
506
- STDOUT is still the default. (Rhett Sutphin)
507
- * Use ADAPTER env variable to select database to test. For example:
508
-
509
- ADAPTER=sqlite3 ruby test/test_suite.rb
510
- (Rhett Sutphin)
511
-
512
- * Eliminate constant redef warnings during test runs (Rhett Sutphin)
513
- * Add missing fixture declarations (Rhett Sutphin)
514
- * Standardize on integer PKs in polymorphic fixtures (Rhett Sutphin)
515
- * Fix tiny file name typos (Buck)
516
-
517
- == 4.0.0 2011-08-31
518
- * Support for AR 3.1
519
-
520
- == 4.0.0.beta9 2011-08-22
521
- * Fix eager-loading in AR 3.1.rc6.
522
-
523
- == 4.0.0.beta9 2011-082-22
524
- * Fix eager-loading in AR 3.1.rc6.
525
-
526
- == 4.0.0.beta8 2011-082-22
527
- * Sqlite 3 fixes (Jan Vlnas)
528
- * Fixes for to_key method (Jan Vlnas)
529
- * Compatible with Rails 3.1 RC6 (Ari Epstein, Travis Warlick)
530
-
531
- == 4.0.0.beta7 2011-07-26
532
- * Compatible with Rails 3.1 RC5 (TycoooN)
533
- * Do not use Arel::Nodes::Or to combine predicates because it creates a
534
- deeply nested stack that blows up.
535
-
536
- == 4.0.0.beta4 2011-07-22
537
- * Compatible with Rails 3.1 stable branch. No longer works with RC4 (Charlie Savage)
538
- * Do not require loading of postgresql gem unless needed (Charlie Savage)
539
-
540
- == 4.0.0.beta3 2011-07-08
541
- * Fix the ability to update the values of a primary key (Travis Warlick)
542
- * Support port and host configurations for postgres rake tasks (Travis Warlick)
543
-
544
- == 4.0.0.beta2 2011-06-21
545
- * ActiveRecord 3.1 RC4 compatibility.
546
- * Fix instantiation of CPK models with included associations
547
-
548
- == 4.0.0.beta1 2011-06-09
549
- * ActiveRecord 3.1 RC1 compatibility. This required a significant rewrite due to
550
- all the changes in AR 3.1 versus 3.0.
551
-
552
- == 3.1.11 2012-05-20
553
- Fix AssociationReflection#derive_primary_key for belongs_to relationships (Heinrich Lee Yu).
554
-
555
- == 3.1.10 2011-07-08
556
- * Bugfix for belongs_to with includes (John Ash)
557
- * Improved tests for calling clear on a habtm association, which involved (David Rueck)
558
- * Fixed bug that resulted in unrelated records being deleted when calling (David Rueck)
559
- * Output deprecation warnings about extra columns in join table CPK-aware (David Rueck)
560
-
561
-
562
- == 3.1.9 2011-06-04
563
- * Improve HABTM association tests (David Rueck)
564
- * Remove deprecated Rake tasks (Charlie Savage)
565
-
566
- == 3.1.8 2011-05-26
567
- * Fix calling clear on a HABTM associate (David Rueck)
568
-
569
- == 3.1.7 2011-05-26
570
- * Support regular AR models having one or many composite models (Jacques Fuentes)
571
- * Minor test cleanup (Charlie Savage)
572
- * Make version requirements more explicit (Charlie Savage)
573
- * Remove Arel extensions used for calculations (Charlie Savage)
574
- * Fix test that included wrong error constant
575
-
576
- == 3.1.6 2011-04-03
577
- * Updated belongs_to association to be a bit more flexible with non-CPK (Charlie Savage)
578
- base models (Jacques Fuentes)
579
- * Fix uniqueness check (David Rueck)
580
- * Fix write issue when one of they keys in a composite key is
581
- called id (Tom Hughes)
582
-
583
-
584
- == 3.1.5 2011-03-24
585
- * Fix simple calculation methods (Charlie Savage)
586
- * Fix instantiation of cpk records via associations (Charlie Savage)
587
- * Fix Relation#delete (Charlie Savage)
588
- * Fix Relation#destroy (Charlie Savage)
589
-
590
-
591
- == 3.1.4 2011-03-06
592
- * Support ActiveRecord 3.0.5 - interpolate_sql was removed and
593
- replaced by interpolate_and_sanitize_sql (Charlie Savage)
594
- * Fix persistence methods to support destroy callbacks (Charlie Savage)
595
- * Support rake 0.9.0 beta (Charlie Savage)
596
-
597
-
598
- == 3.1.2 2011-02-26
599
- * Add back in support for find('3,3') which makes it possible to
600
- do find(params[id]). This implementation is simpler than earlier version
601
- improving code readability.
602
- * Support for finding multiple records either via find([1,2], [3,4])
603
- * Remove to_composite_ids method which is no longer needed
604
-
605
-
606
- == 3.1.1 2011-02-07
607
- * Implement id_before_type_cast (Jason Lewis)
608
- * Add in tests for Model.includes(:other_model)
609
- * Fix object comparison with nil in composite primary keys (StackNG)
610
- * Make it easier to run tests with different database adapters (Toby Cabot)
611
- * Fix AssociationReflection#primary_key_name for polymorphic relationships (Dave Doan)
612
-
613
-
614
- == 3.1.0 2010-12-17
615
- * Add back in rake test tasks (Toby Cabot)
616
- * Add support for multiple string composite keys (wouter)
617
- * Remove support for find('3,3'). Instead use find([3,3])
618
-
619
-
620
- == 3.0.9 2010-12-04
621
- * Fix up support for composite key fixtures.
622
-
623
-
624
- == 3.0.8 2010-12-04
625
- * Fix for translation issue in unique validation. Thanks to Daniel Berger for the patch.
626
- * Fix to support child classes of composite primary key models
627
-
628
-
629
- == 3.0.7 2010-11-29
630
- * Fix has and belongs to many associations implementation.
631
-
632
-
633
- == 3.0.6 2010-11-29 (yanked)
634
- * Add full support for has and belongs to many associations.
635
-
636
-
637
- == 3.0.5 2010-11-28 (yanked)
638
- * Apply patch from Marian Rudzynski for fixing up attribute_methods/primary_key
639
- * Apply patch from Toby Cabot to fix up various sqlite3 issues
640
- * Add partial support for has and belongs to many associations. Currently a cpk model
641
- can have a habtm, but a normal model cannot have a habtm to a cpk model (its actually
642
- not too hard to add, but one step at a time...)
643
-
644
-
645
- == 3.0.4 2010-11-21
646
- * Support deleting records when dependent is set to :delete_all
647
- * Switch the method #id to return a CompositeKeys instance (thus going back to how
648
- this was done in previous CPK versions)
649
-
650
-
651
- == 3.0.3 2010-11-19
652
- * Support ActiveRecord 3.0.3 and Arel 2+
653
- * Require ActiveRecord 3.0.3 as minimum dependency
654
- * Fix double quoting issue with table names - thanks to Kevin Motschiedler for a patch.
655
- * Fix SQLiteAdapter class inheritance issue - thanks to Brandon Hauff for a patch.
656
-
657
-
658
- == 3.0.1.b3 2010-11-07
659
-
660
- * Fix bug in joining to :has_one association
661
- * Added support for Model.find(:last)
662
- * Added support for finding via associations with
663
- limited ids. For example find(:include => :foo, :limit => 1)
664
-
665
- == 3.0.1.b2 2010-11-06
666
-
667
- * Port to Rails 3.0 and Ruby 1.9.2
668
-
669
- * Backwards compatability issues
670
- + You can no longer define a composite primary key with a single field. If you
671
- try, your model will just default to a standard active record model. Removing
672
- this corner case simplified the code.
673
- + Removed CompositePrimaryKeys::CompositeKeys. This was done so that the #to_s
674
- method on composite ids, such as [1,2], returns "[1, 2]". This in turns
675
- reduces the amount of core Rails code that needs to be overridden.
676
- + Setting attribute values by string is no longer supported. For example, this
677
- no longer works:
678
- my_record[[:main_id, :secondary_id]] = '1,2'
679
- Instead, do this:
680
- my_record[[:main_id, :secondary_id]] = [1,2]
681
- Once again, this was done to reduce the amount of overridden Rails code
682
- + At the moment, complex finds with nested arrays do not work. For example
683
- find([[1,2], [3,4]))
684
- + Count methods no longer work. For example, Tariff.count(:include => :product_tariffs)
685
- in the TestAssociations#test_count test returns an error. This is because Rails 3.0
686
- uses Arel to perform such calculations, and its not obvious (at least to me) how to
687
- hook into this new mechanism to support tables with composite keys.
688
- + The TestPolymorphic#test_polymorphic_has_many_through is currently failing, but this
689
- looks like an ActiveRecord 3.0 bug to me.
690
-
691
- == 2.3.5.1 2010-02-13
692
-
693
- * Resolved "warning: already initialized constant HasManyThroughCantAssociateThroughHasManyReflection" [Titi Ala'ilima]
694
-
695
- == 2.3.5 2009-12-16
696
-
697
- * Fixed several bugs in has_one and has_many associations when :primary_key specified [kpumuk]
698
-
699
- == 2.3.2 2009-07-16
700
-
701
- * explicitly load associations.rb due to some getting an unitialized constant error
702
-
703
- == 2.3.2 2009-05-28
704
-
705
- * get tests working again with AR 2.3.2
706
-
707
- == 2.2.1 2009-01-21
708
-
709
- * fix ActiveRecord#exists? to work when passing conditions instead of ids
710
-
711
- == 2.2.0 2008-10-29
712
-
713
- * Rails 2.2.0 compatibility
714
-
715
- == 1.1.0 2008-10-29
716
-
717
- * fixes to get cpk working for Rails 2.1.2
718
-
719
- == 1.0.10 2008-10-22
720
-
721
- * add composite key where clause creator method [timurv]
722
-
723
- == 1.0.9 2008-09-08
724
-
725
- * fix postgres tests
726
- * fix for delete_records when has_many association has composite keys [darxriggs]
727
- * more consistent table/column name quoting [pbrant]
728
-
729
- == 1.0.8 2008-08-27
730
-
731
- * fix has_many :through for non composite models [thx rcarver]
732
-
733
- == 1.0.7 2008-08-12
734
-
735
- * fix for the last fix -- when has_many is composite and belongs_to is single
736
-
737
- == 1.0.6 2008-08-06
738
-
739
- * fix associations create
740
-
741
- == 1.0.5 2008-07-25
742
-
743
- * fix for calculations with a group by clause [thx Sirius Black]
744
-
745
- == 1.0.4 2008-07-15
746
-
747
- * support for oracle_enhanced adapter [thx Raimonds Simanovskis]
748
-
749
- == 1.0.3 2008-07-13
750
-
751
- * more fixes and tests for has many through [thx Menno van der Sman]
752
-
753
- == 1.0.2 2008-06-07
754
-
755
- * fix for has many through when through association has composite keys
756
-
757
- == 1.0.1 2008-06-06
758
-
759
- * Oracle fixes
760
-
761
- == 1.0.0 2008-06-05
762
-
763
- * Support for Rails 2.1
764
-
765
- == 0.9.93 2008-06-01
766
-
767
- * set fixed dependency on activerecord 2.0.2
768
-
769
- == 0.9.92 2008-02-22
770
-
771
- * Support for has_and_belongs_to_many
772
-
773
- == 0.9.91 2008-01-27
774
-
775
- * Incremented activerecord dependency to 2.0.2 [thx emmanuel.pirsch]
776
-
777
- == 0.9.90 2008-01-27
778
-
779
- * Trial release for rails/activerecord 2.0.2 supported
780
-
781
- == 0.9.1 2007-10-28
782
-
783
- * Migrations fix - allow :primary_key => [:name] to work [no unit test] [thx Shugo Maeda]
784
-
785
- == 0.9.0 2007-09-28
786
-
787
- * Added support for polymorphs [thx nerdrew]
788
- * init.rb file so gem can be installed as a plugin for Rails [thx nerdrew]
789
- * Added ibm_db support [thx K Venkatasubramaniyan]
790
- * Support for cleaning dependents [thx K Venkatasubramaniyan]
791
- * Rafactored db rake tasks into namespaces
792
- * Added namespaced tests (e.g. mysql:test for test_mysql)
793
-
794
- == 0.8.6 / 2007-6-12
795
-
796
- * 1 emergency fix due to Rails Core change
797
- * Rails v7004 removed #quote; fixed with connection.quote_column_name [thx nerdrew]
798
-
799
- == 0.8.5 / 2007-6-5
800
-
801
- * 1 change due to Rails Core change
802
- * Can no longer use RAILS_CONNECTION_ADAPTERS from Rails core
803
- * 7 dev improvement:
804
- * Changed History.txt syntax to rdoc format
805
- * Added deploy tasks
806
- * Removed CHANGELOG + migrated into History.txt
807
- * Changed PKG_NAME -> GEM_NAME in Rakefile
808
- * Renamed README -> README.txt for :publish_docs task
809
- * Added :check_version task
810
- * VER => VERS in rakefile
811
- * 1 website improvement:
812
- * website/index.txt includes link to "8 steps to fix other ppls code"
813
-
814
- == 0.8.4 / 2007-5-3
815
-
816
- * 1 bugfix
817
- * Corrected ids_list => ids in the exception message. That'll teach me for not adding unit tests before fixing bugs.
818
-
819
- == 0.8.3 / 2007-5-3
820
-
821
- * 1 bugfix
822
- * Explicit reference to ::ActiveRecord::RecordNotFound
823
- * 1 website addition:
824
- * Added routing help [Pete Sumskas]
825
-
826
- == 0.8.2 / 2007-4-11
827
-
828
- * 1 major enhancement:
829
- * Oracle unit tests!! [Darrin Holst]
830
- * And they work too
831
-
832
- == 0.8.1 / 2007-4-10
833
-
834
- * 1 bug fix:
835
- * Fixed the distinct(count) for oracle (removed 'as')
836
-
837
- == 0.8.0 / 2007-4-6
838
-
839
- * 1 major enhancement:
840
- * Support for calcualtions on associations
841
- * 2 new DB supported:
842
- * Tests run on sqlite
843
- * Tests run on postgresql
844
- * History.txt to keep track of changes like these
845
- * Using Hoe for Rakefile
846
- * Website generator rake tasks
847
-
848
- == 0.3.3
849
- * id=
850
- * create now work
851
-
852
- == 0.1.4
853
- * it was important that #{primary_key} for composites --> 'key1,key2' and not 'key1key2' so created PrimaryKeys class
854
-
855
- == 0.0.1
856
- * Initial version
857
- * set_primary_keys(*keys) is the activation class method to transform an ActiveRecord into a composite primary key AR
858
- * find(*ids) supports the passing of
859
- * id sets: Foo.find(2,1),
860
- * lists of id sets: Foo.find([2,1], [7,3], [8,12]),
861
- * and even stringified versions of the above:
862
- * Foo.find '2,1' or Foo.find '2,1;7,3'
1
+ == 13.0.0
2
+ * Update to ActiveRecord 6.1 (Javier Julio, Charlie Savage, Sammy Larbi)
3
+
4
+ == 12.0.10 (2021-05-09)
5
+ * Support using the #id method on records with primary keys that also have an :id attribute.
6
+
7
+ == 12.0.9 (2021-02-22)
8
+ * Third time is hopefully the charm on MySQL/MariaDB auto increment fix
9
+
10
+ == 12.0.8 (2021-02-16)
11
+ * Revert to previous MySQL/MariaDB auto increment fix
12
+
13
+ == 12.0.7 (2021-02-15)
14
+ * Switch to GitHub actions (ta1kt0me)
15
+ * Fix MySQL/MariaDB query cache issue bug introduced in version 12.0.3 - see #539 (Charlie Savage)
16
+ * Do a better job of supporting composite keys with an auto incrementing field for
17
+ MySQL and MariaDB (Charlie Savage)
18
+
19
+ == 12.0.6 (2021-01-04)
20
+ * Fix issue when calling in_batches without a block (Charlie Savage)
21
+
22
+ == 12.0.5 (2020-12-31)
23
+ * Finally issue with SQLServer when tables are marked as exclude_output_inserted. See #535. (Charlie Savage)
24
+
25
+ == 12.0.4 (2020-12-30)
26
+ * Fix compatibility with Ruby Ruby 2.6 and below (ta1kt0me)
27
+ * Finally get SQLServer mass updates and deletes working (Charlie Savage)
28
+ * Fix MySQL mass updates and deletes that were broken by 12.0.3 (Charlie Savage)
29
+
30
+ == 12.0.3 (2020-11-11)
31
+ * Prevents infinite loops with gems which modify the 'attributes' method (Nicholas Guarino)
32
+ * Improve delete_all and update_all queries (Charlie Savage)
33
+ * Improve Oracle support (Charlie Savage)
34
+ * Improve SQL Server support. Note delete_all and update_all queries still do not work due to
35
+ quirks in SQL Server syntax (Charlie Savage)
36
+ * Improve support for polymorphic associations (Charlie Savage)
37
+ * Update fixtures and tests to include a model that uses an :id column as part of a composite
38
+ key (Charlie Savage)
39
+ * Fixed bug where id values were not correctly mapped between primary and foreign keys in associations (Charlie Savage)
40
+ * Cleanup how the gem is loaded (Charlie Savage)
41
+ * Remove older, unused or minimally used fixtures (Charlie Savage)
42
+
43
+ == 12.0.2 (2020-05-19)
44
+ * Remove deprecation warning for Ruby 2.7 due to keyword parameters (Alexandru Anca )
45
+ * Use sqlite for default in tests (Charlie Savage)
46
+ * Modernize gem tests by using Bundler (Charlie Savage)
47
+ * Update travis for ruby 2.7 (Charlie Savage)
48
+ * Port "Fix create record where one or more of the primary keys has a default value" from ar 5.2 branch (Charlie Savage)
49
+ * Remove extra argument from sql_for_insert for SqlServer (tohae)
50
+
51
+ == 12.0.1 (2019-11-25)
52
+ * Convert attribute names to strings before checking for them in has_attribute? (Daniel de Haas)
53
+ * Update the comment referring to the overridden Rails code (Daniel de Haas)
54
+
55
+ == 12.0.0 (2019-09-03)
56
+ * Update to ActiveRecord 6.0 (Hiroshi Kajisha, Alexandru Anca, Charlie Savage, Sammy Larbi)
57
+ * Update travis setup (Olle Jonsson, Charlie Savage)
58
+
59
+ ==11.3.1 (2020-04-01)¶
60
+ * Fix overriding AbstractReflection for activerecord 5.2.4 (Sergey Semyonov)
61
+ * Fix handling CPK with fields containing comma (Sergey Semyonov)
62
+ * Fixed incorrect SQL condition for joining by CPK (Sergey Semyonov)
63
+ * Update travis.yml file (Sergey Semyonov)
64
+ * Add tests for composite keys with default values (Daniel Wiklund)
65
+ * Fix create record where one or more of the primary keys has a default value (Daniel Wiklund)
66
+
67
+ == 11.2.0 (2019-03-16)
68
+ * When creating new records, honor composite key autoincrementing fields if possible (Antti Pitkänen)
69
+ * Update Association#run to more closely match ActiveRecord (Fabian Mersch)
70
+ * Updates needed due to changes in ActiveRecord (Sammy Larbi)
71
+ * Fix construct_join_attributes method (Brad Slaughter)
72
+ * Fix destroy_all on HABTM (Brad Slaughter)
73
+
74
+ == 11.1.0 (2018-11-14)
75
+ * Support ActiveRecord 5.2.1 (S1Artem Tselovalnikov, Caleb Buxton, Charlie Savage)
76
+ * Fix counter cache (Tomonori Murakami)
77
+ * Fix error on autosave has_one relations when the :primary_key option is set (Charlie Savage)
78
+
79
+ == 11.0.3 (2018-06-25)
80
+ * Fix overridden attribute readers and writers (Charlie Savage)
81
+
82
+ == 11.0.2 (2018-06-24)
83
+ * Remove no longer needed overrides (Charlie Savage)
84
+
85
+ == 11.0.1 (2018-06-20)
86
+ * Fix in_batches (Urmo Rae)
87
+ * Fix apply_join_dependency (Charlie Savage)
88
+
89
+ == 11.0.0 (2018-06-18)
90
+ * Update to ActiveRecord 5.2 (Charlie Savage)
91
+ * Fixes for AR 5.2 persistence changes (Erik Rothoff, Charlie Savage)
92
+ * Fix system stack error (i2bskn)
93
+
94
+ == 11.0.0.rc2 (2018-02-25)
95
+
96
+ * Fix mysql deletion failure (Charlie Savage)
97
+ * Clean test run for postgresql, mysql and sqlite3 (Charlie Savage)
98
+
99
+ == 11.0.0.rc1 (2018-02-25)
100
+
101
+ * Update to ActiveRecord 5.2.rc1 (Charlie Savage)
102
+ * Fix uniquness check (Charlie Savage)
103
+
104
+ == 11.0.0.beta4 (2018-01-08)
105
+
106
+ * Try again on Calculations#execute_simple_calculation for ActiveRecord 5.2.beta2 (Charlie Savage)
107
+
108
+ == 11.0.0.beta3 (2018-01-07)
109
+
110
+ * Fix typo in Readme.doc (Lopez Lucien)
111
+ * Fix Calculations#execute_simple_calculation for ActiveRecord 5.2.beta2 (Charlie Savage)
112
+
113
+ == 11.0.0.beta2 (2017-12-10)
114
+
115
+ * Minor updates for ActiveRecord 5.2.beta2 support (Charlie Savage)
116
+
117
+ == 11.0.0.beta1 (2017-12-03)
118
+
119
+ * ActiveRecord 5.2.beta2 support (Charlie Savage)
120
+
121
+ == 10.0.5 (2018-06-24)
122
+ * Fix in_batches (Urmo Rae)
123
+
124
+ == 10.0.4 (2018-06-17)
125
+
126
+ * Lock mysql2 gem to 0.4.x (Le Trung Kien)
127
+ * Set inversion when using preload (Le Trung Kien)
128
+ * Fixes for AR 5.1.6 (Tim Morgan)
129
+
130
+ == 10.0.3 (2018-02-25)
131
+
132
+ * Require a minimum of activerecord version 5.1.5 (Tom Hughes)
133
+
134
+ == 10.0.2 (2017-12-02)
135
+
136
+ * Fix frozen string mutation for mysql (Sergey Sein)
137
+ * Fix autosave for belongs_to associations (Fabian Mersch)
138
+ * Require a minimum of activerecord version 5.1.4 (Charlie Savage)
139
+
140
+ == 10.0.1 (2017-10-08)
141
+
142
+ * Fixed an error that happened when a table attribute had the same name as the table (Taishi Kasuga)
143
+
144
+ == 10.0.0 (2017-10-08)
145
+
146
+ * Support ActiveRecord 5.1.x (Pinak Thakkar, Jordan Owens)
147
+ * Fix Paper Trail compatibility (Sean Linsley)
148
+ * Fix typo in Readme (Mike Gunderloy)
149
+ * Improved sql server support (Artyom Nikolaev)
150
+
151
+ == 9.0.10 (2018-06-24)
152
+
153
+ * Fix AR 5.0.7 (Jordan Owens)
154
+
155
+ == 9.0.8 (2017-10-11)
156
+
157
+ * Fix Paper Trail compatibility (Sean Linsley)
158
+
159
+ == 9.0.7 (2017-05-22)
160
+
161
+ * Update sqlite3 to support deletes and updates (Charlie Savage)
162
+ * Specify version for sql server gem so it works with Rails 5.0 (Charlie Savage)
163
+ * Use `datetime` datatype to address Invalid default value for updated_at (Yasuo Honda)
164
+ * Fix ORA-00900 error when it attempts to execute blank statement (pustomytnyk)
165
+ * Override ActiveRecord::Associations::CollectionAssociation#ids_reader (pustomytnyk)
166
+ * Only define #primary_keys if #primary_keys=(value) is called (Charlie Savage)
167
+ * Change `timestamp` to `datetime` for MySQL as ActiveRecord timestamps type does (Oriol Collel)
168
+ * Fix incorrect case statement to get PK for SQLServer (Oriol Collel)
169
+ * Fixes random failures in test_preload_of_polymorphic_association (Boris Peterbarg)
170
+
171
+ == 9.0.6 (2017-01-08)
172
+
173
+ * Uncomment tests (Sammy Larbi)
174
+ * Update readme (Charlie Savage)
175
+
176
+ == 9.0.5 (2017-01-02)
177
+
178
+ * Don't nest PK twice when looking up id, fixes #319 (Kerey Roper)
179
+ * Simplify database setup for tests (Charlie Savage)
180
+ * Revamp gem management (Charlie Savage)
181
+ * Add support for Relation#update_all when using joins (Charlie Savage)
182
+ * Add erb support to test database.yml files (Charlie Savage)
183
+ * Sqlserver fixes for ordering (Charlie Savage)
184
+ * Sqlserver refresh (Charlie Savage)
185
+ * Oracle refresh (Charlie Savage)
186
+ * Fix delete_all for MySql (Charlie Savage)
187
+ * Added test cases for preloading associations with and without conditions (Martin Körner)
188
+ * Revamp single association handling to correctly setup SQL binds (Charlie Savage)
189
+ * Remove references to ActiveModel - #352 (Charlie Savage)
190
+ * Fixes for #232, #359, #367 and #371 (Charlie Savage)
191
+
192
+ == 9.0.4 (2016-08-17)
193
+ * Do not set associations to readonly. See https://github.com/rails/rails/issues/24093 (Charlie Savage)
194
+
195
+ == 9.0.2 (2016-08-10)
196
+ * Fix delete_all when used with a join (Charlie Savage)
197
+
198
+ == 9.0.1 (2016-07-27)
199
+ * Create OR predicates in a nicely balanced tree fixing #320 (Nathan Samson)
200
+
201
+ == 9.0.0 (2016-07-06)
202
+ * Support connection_specification_name in rails5.0.0.rc1 (pocari)
203
+
204
+ == 9.0.0.beta1 (2016-04-16)
205
+ * Rails 5 beta support (Sammy Larbi)
206
+
207
+ == 8.1.7 (2019-05-04)
208
+
209
+ Fix key not being an array in subquery on has_many :through (Eric Proulx)
210
+ Convert batches to arrays before continuing loop (Jeremy Mickelson)
211
+
212
+ == 8.1.6 (2017-05-20)
213
+
214
+ Query cache with bind params (ttw)
215
+ Fix TestIds#test_set_ids_string. Sqlite's serial and integer are a bit different (Boris Peterbarg)
216
+ Associations with inverse fix (Boris Peterbarg)
217
+ Fix save_has_one_association and add a test for it (Boris Peterbarg)
218
+ Fix save_belongs_to_association override (Boris Peterbarg)
219
+ Extend approach from #344 to fix autosave for has_one associations as well (Cameron Finucane)
220
+
221
+ == 8.1.5 (2017-01-01)
222
+
223
+ * Don't nest PK twice when looking up id, fixes #319 (Kerey Roper)
224
+
225
+ == 8.1.4 (2016-07-27)
226
+
227
+ * Create OR predicates in a nicely balanced tree fixing #320 (Nathan Samson)
228
+ * Fix find in batches (apurvis)
229
+
230
+ == 8.1.3 (2016-04-16)
231
+
232
+ * Make CPK work for Arel::Attributes::Attribute (Rick Xing)
233
+ * Change autosave_association.rb so that association autosave can work (Rick Xing)
234
+ * Fix exception when saving "other_ids=" with a has_many :through association where the source
235
+ association is polymorphic (Tye Shavik)
236
+ * Fix Arel::Nodes::In where left side is not a column (Tye Shavik)
237
+
238
+ == 8.1.2 (2015-12-13)
239
+
240
+ * Fix failing tests
241
+
242
+ == 8.1.1 (2015-08-04)
243
+
244
+ * Updates to make Travis CI green (Laust Rud Jacobsen)
245
+ * Travis CI support (Laust Rud Jacobsen)
246
+ * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
247
+ for non-peristed objects (Charlie Savage)
248
+ * Update support for Uniquenes validations (Avi Leavitt)
249
+ * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
250
+ * Aligned the establish connection paramater handling to be similar to latest version of rails (Harish Shetty)
251
+
252
+
253
+ == 8.1.0 (2014-03-23)
254
+
255
+ * ActiveRecord 4.2.1 support (Charlie Savage)
256
+ * Change parsing of composite ids to fix #290 (Charlie Savage)
257
+ * Add sqlserver setting for test suite (Joachim Herb)
258
+ * Fix sqlserver adapater, isse #224 (Joachim Herb)
259
+ * Update readme file to include version 8.* information (David Silva)
260
+
261
+ == 8.0.1 (2014-01-24)
262
+
263
+ * Support optimistic lock and lock_version added to existing fixtures (Kirika)
264
+
265
+ == 8.0.0 (2014-01-10)
266
+
267
+ * ActiveRecord 4.2.* support (Sammy Larbi)
268
+
269
+ == 7.0.14 (2015-08-04)
270
+
271
+ * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
272
+ for non-peristed objects (Charlie Savage)
273
+ * Update support for Uniquenes validations (Avi Leavitt)
274
+ * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
275
+
276
+ == 7.0.13 (2015-01-24)
277
+
278
+ * Support optimistic lock and lock_version added to existing fixtures (Kirika)
279
+ * README change to convey finding available versions (Aaron Bartell)
280
+ * Fixes indentation in product_tariffs (Zaldabus)
281
+
282
+ == 7.0.12 (2014-11-09)
283
+
284
+ * ActiveRecord 4.1.7 support (Tom Hughes)
285
+ * Extract CPK methods to its own module and extending instead of opening the singleton class
286
+ which fixes Marshal#dump (Nicolás Hock Isaza)
287
+
288
+ == 7.0.11 (2014-10-10)
289
+
290
+ * ActiveRecord 4.1.6 support (Tom Hughes, Charlie Savage)
291
+ * Verify MariaDB support and update docs (Isi Robayna)
292
+ * Postgresql binary column support (Piotr Gębala)
293
+ * Fix deleting of records from collection association (akeuk and Charlie Savage)
294
+ * Fix invalid include (shiro16)
295
+ * Improve tests (Yann Marquet)
296
+
297
+ == 7.0.10 (2014-08-07)
298
+
299
+ * Update attribute dirty methods to allow attribute *_was
300
+ fields to be calculated correctly for enum fields (Zachary Salzbank)
301
+ * Update read/write methods to match latest version of ActiveRecord (Charlie Savage)
302
+
303
+ == 7.0.9 (2014-08-03)
304
+
305
+ * Second attemp at fixing instantiation of has_many records via :includes that use composite keys - this
306
+ time take into account no target records (Charlie Savage)
307
+
308
+ == 7.0.8 (2014-08-03)
309
+
310
+ * Fix instantiation of has_many records via :includes that use composite keys (Charlie Savage)
311
+
312
+ == 7.0.7 (2014-07-29)
313
+
314
+ * Add back support for calling find like this (Sammy Larbi):
315
+
316
+ Membership.find('1,1')
317
+
318
+ == 7.0.7 (2014-07-29)
319
+
320
+ * Add back support for calling find like this (Sammy Larbi):
321
+
322
+ Membership.find('1,1')
323
+
324
+ == 7.0.6 (2014-07-22)
325
+
326
+ * Change the way we override ActiveRecord::Persistence to call sequence of included modules such
327
+ as callbacks (Charlie Savage)
328
+
329
+ == 7.0.5 (2014-07-21)
330
+
331
+ * Remove overriden Postgresql adapter code (Charlie Savage)
332
+
333
+ == 7.0.4 (2014-07-09)
334
+
335
+ * Fix overriding of Relation#where_values_hash (Pavel)
336
+ * Add travis CI support (Pavel)
337
+ * Run AR's original relation_for_destroy when primary key is not composite (Pavel)
338
+
339
+ == 7.0.3 (2014-07-04)
340
+
341
+ * Fixes for Rails 4.1.2+ compatibility (Tom Hughes)
342
+ * Nested attribute fix (Sammy Larb)
343
+ * Test fixes (Sammy Larb)
344
+ * Fixes instantiating join records (Charlie Savage)
345
+
346
+ == 7.0.2 (2014-06-01)
347
+
348
+ * Fix id_was when one of the column names is called id (Adrian Hooper)
349
+ * Fix queries that use ActiveRecord objects in the where clause (Adrian Hooper)
350
+
351
+ == 7.0.1 (2014-05-27)
352
+
353
+ * Fix setting of timestamps automatically by Rails (Charlie Savage)
354
+
355
+ == 7.0.0 (2014-05-26)
356
+
357
+ * Active Record 4.1 support! (Charlie Savage, Tom Hughes, Simon South)
358
+
359
+ Note there is one big api change. Previously, CPK supported both of these calls:
360
+
361
+ Membership.find(1,1)
362
+ Membership.find([1,1])
363
+
364
+ The first one no longer works. It was removed because it made the internal code simpler
365
+ and makes the intention of the code clearer (especially when finding multiple records).
366
+ If this change causes too much pain then please submit a ticket on Github.
367
+
368
+ == 6.0.08 (2015-01-24)
369
+
370
+ * Fix habtm association #delete_records (Uros Jurglic)
371
+ * Support optimistic locking (Toshio Maki)
372
+ * Remove singleton classes on CPK relations (Nicolás Hock Isaza)
373
+
374
+ == 6.0.7 (2014-10-06)
375
+
376
+ * Support Rails 4.0.6 (Tom Hughes)
377
+
378
+ == 6.0.6 (2014-05-26)
379
+
380
+ * Don't refer to deprecated set_primary_keys in README (Henare Degan)
381
+ * Fix gemspec dependency (Charlie Savage)
382
+
383
+ == 6.0.5 (2014-05-20)
384
+
385
+ * Removed debugging output (Dan Draper)
386
+ * Fixes to ensure that has_one associations work correctly (Dan Draper)
387
+ * Fix postgres db migration failure since no result is returned in some cases (seashell-qd)
388
+ * Fix exception raised in method "id=" (seashell.qd@hotmail.com)
389
+
390
+ == 6.0.3 (2014-04-28)
391
+
392
+ * Fixes setting of primary key when CPK is not used for a given model (see #191)
393
+
394
+ == 6.0.2 (2014-04-28)
395
+
396
+ * Fixes relating to ActiveRecord 4.0.x compatibility (Dan Draper)
397
+ * Ensure that primary key is set on instance when creating new records (Dan Draper)
398
+
399
+ == 6.0.1 (2013-11-29)
400
+
401
+ * Handle records == :all in HasManyAssociation#delete_records. Without this calling
402
+ delete or clear on a has_many assocation can result in an exception (Tom Hughes)
403
+ * Don't include cpk key as an attributes - fixes json serialization - #168 (Charlie Savage)
404
+ * Fix tests running on ruby 1.9.3 (Charlie Savage)
405
+ * Update nested_attributes to work with activerecord 4.0.x (Nick DeLuca)
406
+
407
+ == 6.0.0 (2013-08-04)
408
+ * ActiveRecord 4.0 support (Sammy Larbi)
409
+
410
+ == 5.0.13 2013-04-27
411
+ * Batch query improvements (Jordan Byron)
412
+ * Support nested attributes (aiasfina and Charlie Savage)
413
+
414
+ == 5.0.12 2013-01-21
415
+ * Fix HasManyAssociation foreign_key_present? method to work with non CPK assocations (Charlie Savage)
416
+
417
+ == 5.0.11 2013-01-19
418
+ * Patch HasManyAssociation foreign_key_present? method to work with array of keys (tbeauvais)
419
+ * Patch reverse_sql_order method to break apart CPKs (tbeauvais)
420
+ * Add test and fix for nested_attributes update (Dinshaw Gobhai)
421
+ * Add test and fix for to_sym exception (Dinshaw Gobhai)
422
+ * Add missing timestamp columns for mysql test_touch.rb (Dinshaw Gobhai)
423
+
424
+ == 5.0.10 2012-11-21
425
+ * ActiveRecord 3.2.9 compatability (Tom Hughes, Chris Heald, Jack Tang)
426
+ * Add support for find_in_batches (Charlie Savage)
427
+ * Add support for touch method (Macario Ortega)
428
+ * Remove symbolized representation of primary keys to be consistent with ActiveRecord (Tiago Cardoso)
429
+ * Update destroy method to use hash of primary keys over an array. This allows the proper SQL
430
+ (using IS NULL) to be generated when one of the primary key attributes is nil (Scott Hunter).
431
+
432
+ == 5.0.9 2012-09-29
433
+ * Enable tests for MS SQL Servder (Enderson Maia)
434
+ * Update ActiveRecord::Base#initialize_dup override in line with ActiveRecord::Base 3.2.5+ (Lucas Maxwell)
435
+ * Require postgresql_adapter.rb also when using activerecord-postgis-adapter (Torsti Schulz)
436
+ * Make cpk_in_predicate build a simple IN when possible (Tom Hughes)
437
+ * Fixed problem loading jdbcpostgresql adapter (Troy Caldwell)
438
+ * Add support for counter cache (Charlie Savage)
439
+ * Fix recreating postgresql database (Charlie Savage)
440
+ * Update dependency to ActiveRecord 3.2.8 or higher (Charlie Savage)
441
+
442
+ == 5.0.8 2012-07-01
443
+ * Enabled tests for MS SQL Server (Enderson Maia)
444
+ * Update establish_connection to work with Rails 3.2.6 (Ivan Schneider)
445
+ * Fix typos in rake tasks names in README_tests.rdoc (Ivan Schneider)
446
+ * Fix problem with deleting non-CPK in Rails 3.2.5 (Sammy Larbi)
447
+ * Fixes relationship deletion for HABTM in Rails when it passes :all flag instead of
448
+ an array of IDs. Also adds new tests and test fixtures (Sammy Larbi)
449
+ * Change mysql db creation to execute one statement each time, since in some setups
450
+ it will not run multiple statements (Sammy Larbi)
451
+ * Fix multiple assignments to same column due to duplicate keys in @changed_attributes.
452
+ Includes test fixes (Jan Vlnas)
453
+
454
+ == 5.0.7 2012-06-03
455
+ * Fixed bug where validates_uniqueness failed for 3 or more primary keys. (Charlie Savage)
456
+
457
+ == 5.0.6 2012-05-20
458
+ * Fixed bug where setting a belongs_to association to nil would raise an error (Tyler Rick)
459
+ * Remove special case code for 1 column selects and just choose to use Rails version of the
460
+ method unless we need ours to deal with an Array (Sammy Larbi)
461
+ * Change count tests to actually check for distinct, fix resulting error it
462
+ demonstrated in the code (Sammy Larbi)
463
+ * Specify mysql2 driver by default (Charlie Savage)
464
+ * Update sqlite tests to run on Windows (Charlie Savage)
465
+
466
+ == 5.0.5 2012-05-05
467
+ * Count without slower subquery in cases where that is possible (Sammy Larbi)
468
+ * When you call association.build for a has_many association that uses a
469
+ composite foreign key, the newly built child record should have the values
470
+ in its belongs_to foreign_key populated from its owner's values (Tyler Rick).
471
+ * Removed test_has_many_with_primary_key method that wasn't being used because
472
+ another method by the same name was defined below it (Tyler Rick).
473
+ * Fixed a bug that was causing object.changes to raise TypeError (Tyler Rick)
474
+ * Fix error when running rake mysql:rebuild_databases (Tyler Rick)
475
+ * to_param should join with comma instead of minus sign (Tsutomu Kuroda)
476
+ * Fix the "Factories" section of README.rdoc (Tsutomu Kuroda)
477
+
478
+ == 5.0.4 2012-03-23
479
+ * Update ActiveRecord::AttributeMethods#Write for Rails 3.2.2 (Travis Warlick)
480
+
481
+ == 5.0.4 2012-03-23
482
+ * Yanked
483
+
484
+ == 5.0.2 2012-03-16
485
+ * Use .rdoc extension on RDoc files (Elia Schito)
486
+ * Update documentation to use self.primary_keys instead of set_primary_keys (Miguel Fonseca)
487
+ * Added tests for comparing composite ids (Jim Jones)
488
+ * Updating the README for clarity (Brett Fishman)
489
+ * Fix method signature mismatch with active_record (Miguel Fonseca)
490
+ * Fix ref in README (Elia Schito)
491
+ * Add test for habm create (Charlie Savage)
492
+
493
+ == 5.0.1 2012-02-13
494
+ * Fix deprecation warning that was exactly backwards (Tom Hughes)
495
+ * Fix primary_keys handling in models that inherit from other models
496
+ but don't redefine their primary_key. Problem was the inherited
497
+ models didn't correctly reference their parents primary_keys (Charlie Savage)
498
+
499
+ == 5.0.0 2012-02-12
500
+ * Fix tests so they pass on MySql (Charlie Savage)
501
+ * Fix calculations to work with duplicate column names (cleesmith)
502
+ * Switch rake tasks for Postgresql and MySql to use ActiveRecord API for
503
+ creating and dropping databases (Charlie Savage)
504
+ * Follow AR 3.2 lead and introduce self.primary_keys and deprecate set_primary_keys (Charlie Savage)
505
+ * Switch from set_primary_key to self.primary_key= to avoid Rails deprecation (Charlie Savage)
506
+ * Fix issue when using multiple database connections (David Doan)
507
+ * Fix homepage in gemspec and remove email address (Charlie Savage)
508
+ * Add support for string keys to exists? (Jan Vlnas)
509
+ * Fix typo (Jason Karns)
510
+
511
+ == 5.0.0.rc1 2012-01-16
512
+ * ActiveRecord 3.2 support
513
+
514
+ == 4.1.2 2012-01-12
515
+ * Helper to allow the same tests to be used for both Oracle and other DBs
516
+ by replacing quoted identifiers with all-caps equivalents on Oracle (Rhett Sutphin)
517
+ * Update Oracle tests (Rhett Sutphin)
518
+
519
+ == 4.1.1 2011-08-31
520
+ * Support for AR 3.1.1
521
+ * Make polymorphic belongs_to work in rails 3.1.1 (Tom Hughes)
522
+ * Eliminate relative paths from the test suite (Rhett Sutphin)
523
+ * Minor improvements to the CPK test runner w/o relative path changes (Rhett Sutphin)
524
+ * Remove stray puts (Rhett Sutphin)
525
+ * Allow AR logs to go to a file when running tests. This commit allows you to
526
+ specify a file to use instead via the CPK_LOGFILE environment variable.
527
+ STDOUT is still the default. (Rhett Sutphin)
528
+ * Use ADAPTER env variable to select database to test. For example:
529
+
530
+ ADAPTER=sqlite3 ruby test/test_suite.rb
531
+ (Rhett Sutphin)
532
+
533
+ * Eliminate constant redef warnings during test runs (Rhett Sutphin)
534
+ * Add missing fixture declarations (Rhett Sutphin)
535
+ * Standardize on integer PKs in polymorphic fixtures (Rhett Sutphin)
536
+ * Fix tiny file name typos (Buck)
537
+
538
+ == 4.0.0 2011-08-31
539
+ * Support for AR 3.1
540
+
541
+ == 4.0.0.beta9 2011-08-22
542
+ * Fix eager-loading in AR 3.1.rc6.
543
+
544
+ == 4.0.0.beta9 2011-082-22
545
+ * Fix eager-loading in AR 3.1.rc6.
546
+
547
+ == 4.0.0.beta8 2011-082-22
548
+ * Sqlite 3 fixes (Jan Vlnas)
549
+ * Fixes for to_key method (Jan Vlnas)
550
+ * Compatible with Rails 3.1 RC6 (Ari Epstein, Travis Warlick)
551
+
552
+ == 4.0.0.beta7 2011-07-26
553
+ * Compatible with Rails 3.1 RC5 (TycoooN)
554
+ * Do not use Arel::Nodes::Or to combine predicates because it creates a
555
+ deeply nested stack that blows up.
556
+
557
+ == 4.0.0.beta4 2011-07-22
558
+ * Compatible with Rails 3.1 stable branch. No longer works with RC4 (Charlie Savage)
559
+ * Do not require loading of postgresql gem unless needed (Charlie Savage)
560
+
561
+ == 4.0.0.beta3 2011-07-08
562
+ * Fix the ability to update the values of a primary key (Travis Warlick)
563
+ * Support port and host configurations for postgres rake tasks (Travis Warlick)
564
+
565
+ == 4.0.0.beta2 2011-06-21
566
+ * ActiveRecord 3.1 RC4 compatibility.
567
+ * Fix instantiation of CPK models with included associations
568
+
569
+ == 4.0.0.beta1 2011-06-09
570
+ * ActiveRecord 3.1 RC1 compatibility. This required a significant rewrite due to
571
+ all the changes in AR 3.1 versus 3.0.
572
+
573
+ == 3.1.11 2012-05-20
574
+ Fix AssociationReflection#derive_primary_key for belongs_to relationships (Heinrich Lee Yu).
575
+
576
+ == 3.1.10 2011-07-08
577
+ * Bugfix for belongs_to with includes (John Ash)
578
+ * Improved tests for calling clear on a habtm association, which involved (David Rueck)
579
+ * Fixed bug that resulted in unrelated records being deleted when calling (David Rueck)
580
+ * Output deprecation warnings about extra columns in join table CPK-aware (David Rueck)
581
+
582
+
583
+ == 3.1.9 2011-06-04
584
+ * Improve HABTM association tests (David Rueck)
585
+ * Remove deprecated Rake tasks (Charlie Savage)
586
+
587
+ == 3.1.8 2011-05-26
588
+ * Fix calling clear on a HABTM associate (David Rueck)
589
+
590
+ == 3.1.7 2011-05-26
591
+ * Support regular AR models having one or many composite models (Jacques Fuentes)
592
+ * Minor test cleanup (Charlie Savage)
593
+ * Make version requirements more explicit (Charlie Savage)
594
+ * Remove Arel extensions used for calculations (Charlie Savage)
595
+ * Fix test that included wrong error constant
596
+
597
+ == 3.1.6 2011-04-03
598
+ * Updated belongs_to association to be a bit more flexible with non-CPK (Charlie Savage)
599
+ base models (Jacques Fuentes)
600
+ * Fix uniqueness check (David Rueck)
601
+ * Fix write issue when one of they keys in a composite key is
602
+ called id (Tom Hughes)
603
+
604
+
605
+ == 3.1.5 2011-03-24
606
+ * Fix simple calculation methods (Charlie Savage)
607
+ * Fix instantiation of cpk records via associations (Charlie Savage)
608
+ * Fix Relation#delete (Charlie Savage)
609
+ * Fix Relation#destroy (Charlie Savage)
610
+
611
+
612
+ == 3.1.4 2011-03-06
613
+ * Support ActiveRecord 3.0.5 - interpolate_sql was removed and
614
+ replaced by interpolate_and_sanitize_sql (Charlie Savage)
615
+ * Fix persistence methods to support destroy callbacks (Charlie Savage)
616
+ * Support rake 0.9.0 beta (Charlie Savage)
617
+
618
+
619
+ == 3.1.2 2011-02-26
620
+ * Add back in support for find('3,3') which makes it possible to
621
+ do find(params[id]). This implementation is simpler than earlier version
622
+ improving code readability.
623
+ * Support for finding multiple records either via find([1,2], [3,4])
624
+ * Remove to_composite_ids method which is no longer needed
625
+
626
+
627
+ == 3.1.1 2011-02-07
628
+ * Implement id_before_type_cast (Jason Lewis)
629
+ * Add in tests for Model.includes(:other_model)
630
+ * Fix object comparison with nil in composite primary keys (StackNG)
631
+ * Make it easier to run tests with different database adapters (Toby Cabot)
632
+ * Fix AssociationReflection#primary_key_name for polymorphic relationships (Dave Doan)
633
+
634
+
635
+ == 3.1.0 2010-12-17
636
+ * Add back in rake test tasks (Toby Cabot)
637
+ * Add support for multiple string composite keys (wouter)
638
+ * Remove support for find('3,3'). Instead use find([3,3])
639
+
640
+
641
+ == 3.0.9 2010-12-04
642
+ * Fix up support for composite key fixtures.
643
+
644
+
645
+ == 3.0.8 2010-12-04
646
+ * Fix for translation issue in unique validation. Thanks to Daniel Berger for the patch.
647
+ * Fix to support child classes of composite primary key models
648
+
649
+
650
+ == 3.0.7 2010-11-29
651
+ * Fix has and belongs to many associations implementation.
652
+
653
+
654
+ == 3.0.6 2010-11-29 (yanked)
655
+ * Add full support for has and belongs to many associations.
656
+
657
+
658
+ == 3.0.5 2010-11-28 (yanked)
659
+ * Apply patch from Marian Rudzynski for fixing up attribute_methods/primary_key
660
+ * Apply patch from Toby Cabot to fix up various sqlite3 issues
661
+ * Add partial support for has and belongs to many associations. Currently a cpk model
662
+ can have a habtm, but a normal model cannot have a habtm to a cpk model (its actually
663
+ not too hard to add, but one step at a time...)
664
+
665
+
666
+ == 3.0.4 2010-11-21
667
+ * Support deleting records when dependent is set to :delete_all
668
+ * Switch the method #id to return a CompositeKeys instance (thus going back to how
669
+ this was done in previous CPK versions)
670
+
671
+
672
+ == 3.0.3 2010-11-19
673
+ * Support ActiveRecord 3.0.3 and Arel 2+
674
+ * Require ActiveRecord 3.0.3 as minimum dependency
675
+ * Fix double quoting issue with table names - thanks to Kevin Motschiedler for a patch.
676
+ * Fix SQLiteAdapter class inheritance issue - thanks to Brandon Hauff for a patch.
677
+
678
+
679
+ == 3.0.1.b3 2010-11-07
680
+
681
+ * Fix bug in joining to :has_one association
682
+ * Added support for Model.find(:last)
683
+ * Added support for finding via associations with
684
+ limited ids. For example find(:include => :foo, :limit => 1)
685
+
686
+ == 3.0.1.b2 2010-11-06
687
+
688
+ * Port to Rails 3.0 and Ruby 1.9.2
689
+
690
+ * Backwards compatability issues
691
+ + You can no longer define a composite primary key with a single field. If you
692
+ try, your model will just default to a standard active record model. Removing
693
+ this corner case simplified the code.
694
+ + Removed CompositePrimaryKeys::CompositeKeys. This was done so that the #to_s
695
+ method on composite ids, such as [1,2], returns "[1, 2]". This in turns
696
+ reduces the amount of core Rails code that needs to be overridden.
697
+ + Setting attribute values by string is no longer supported. For example, this
698
+ no longer works:
699
+ my_record[[:main_id, :secondary_id]] = '1,2'
700
+ Instead, do this:
701
+ my_record[[:main_id, :secondary_id]] = [1,2]
702
+ Once again, this was done to reduce the amount of overridden Rails code
703
+ + At the moment, complex finds with nested arrays do not work. For example
704
+ find([[1,2], [3,4]))
705
+ + Count methods no longer work. For example, Tariff.count(:include => :product_tariffs)
706
+ in the TestAssociations#test_count test returns an error. This is because Rails 3.0
707
+ uses Arel to perform such calculations, and its not obvious (at least to me) how to
708
+ hook into this new mechanism to support tables with composite keys.
709
+ + The TestPolymorphic#test_polymorphic_has_many_through is currently failing, but this
710
+ looks like an ActiveRecord 3.0 bug to me.
711
+
712
+ == 2.3.5.1 2010-02-13
713
+
714
+ * Resolved "warning: already initialized constant HasManyThroughCantAssociateThroughHasManyReflection" [Titi Ala'ilima]
715
+
716
+ == 2.3.5 2009-12-16
717
+
718
+ * Fixed several bugs in has_one and has_many associations when :primary_key specified [kpumuk]
719
+
720
+ == 2.3.2 2009-07-16
721
+
722
+ * explicitly load associations.rb due to some getting an unitialized constant error
723
+
724
+ == 2.3.2 2009-05-28
725
+
726
+ * get tests working again with AR 2.3.2
727
+
728
+ == 2.2.1 2009-01-21
729
+
730
+ * fix ActiveRecord#exists? to work when passing conditions instead of ids
731
+
732
+ == 2.2.0 2008-10-29
733
+
734
+ * Rails 2.2.0 compatibility
735
+
736
+ == 1.1.0 2008-10-29
737
+
738
+ * fixes to get cpk working for Rails 2.1.2
739
+
740
+ == 1.0.10 2008-10-22
741
+
742
+ * add composite key where clause creator method [timurv]
743
+
744
+ == 1.0.9 2008-09-08
745
+
746
+ * fix postgres tests
747
+ * fix for delete_records when has_many association has composite keys [darxriggs]
748
+ * more consistent table/column name quoting [pbrant]
749
+
750
+ == 1.0.8 2008-08-27
751
+
752
+ * fix has_many :through for non composite models [thx rcarver]
753
+
754
+ == 1.0.7 2008-08-12
755
+
756
+ * fix for the last fix -- when has_many is composite and belongs_to is single
757
+
758
+ == 1.0.6 2008-08-06
759
+
760
+ * fix associations create
761
+
762
+ == 1.0.5 2008-07-25
763
+
764
+ * fix for calculations with a group by clause [thx Sirius Black]
765
+
766
+ == 1.0.4 2008-07-15
767
+
768
+ * support for oracle_enhanced adapter [thx Raimonds Simanovskis]
769
+
770
+ == 1.0.3 2008-07-13
771
+
772
+ * more fixes and tests for has many through [thx Menno van der Sman]
773
+
774
+ == 1.0.2 2008-06-07
775
+
776
+ * fix for has many through when through association has composite keys
777
+
778
+ == 1.0.1 2008-06-06
779
+
780
+ * Oracle fixes
781
+
782
+ == 1.0.0 2008-06-05
783
+
784
+ * Support for Rails 2.1
785
+
786
+ == 0.9.93 2008-06-01
787
+
788
+ * set fixed dependency on activerecord 2.0.2
789
+
790
+ == 0.9.92 2008-02-22
791
+
792
+ * Support for has_and_belongs_to_many
793
+
794
+ == 0.9.91 2008-01-27
795
+
796
+ * Incremented activerecord dependency to 2.0.2 [thx emmanuel.pirsch]
797
+
798
+ == 0.9.90 2008-01-27
799
+
800
+ * Trial release for rails/activerecord 2.0.2 supported
801
+
802
+ == 0.9.1 2007-10-28
803
+
804
+ * Migrations fix - allow :primary_key => [:name] to work [no unit test] [thx Shugo Maeda]
805
+
806
+ == 0.9.0 2007-09-28
807
+
808
+ * Added support for polymorphs [thx nerdrew]
809
+ * init.rb file so gem can be installed as a plugin for Rails [thx nerdrew]
810
+ * Added ibm_db support [thx K Venkatasubramaniyan]
811
+ * Support for cleaning dependents [thx K Venkatasubramaniyan]
812
+ * Rafactored db rake tasks into namespaces
813
+ * Added namespaced tests (e.g. mysql:test for test_mysql)
814
+
815
+ == 0.8.6 / 2007-6-12
816
+
817
+ * 1 emergency fix due to Rails Core change
818
+ * Rails v7004 removed #quote; fixed with connection.quote_column_name [thx nerdrew]
819
+
820
+ == 0.8.5 / 2007-6-5
821
+
822
+ * 1 change due to Rails Core change
823
+ * Can no longer use RAILS_CONNECTION_ADAPTERS from Rails core
824
+ * 7 dev improvement:
825
+ * Changed History.txt syntax to rdoc format
826
+ * Added deploy tasks
827
+ * Removed CHANGELOG + migrated into History.txt
828
+ * Changed PKG_NAME -> GEM_NAME in Rakefile
829
+ * Renamed README -> README.txt for :publish_docs task
830
+ * Added :check_version task
831
+ * VER => VERS in rakefile
832
+ * 1 website improvement:
833
+ * website/index.txt includes link to "8 steps to fix other ppls code"
834
+
835
+ == 0.8.4 / 2007-5-3
836
+
837
+ * 1 bugfix
838
+ * Corrected ids_list => ids in the exception message. That'll teach me for not adding unit tests before fixing bugs.
839
+
840
+ == 0.8.3 / 2007-5-3
841
+
842
+ * 1 bugfix
843
+ * Explicit reference to ::ActiveRecord::RecordNotFound
844
+ * 1 website addition:
845
+ * Added routing help [Pete Sumskas]
846
+
847
+ == 0.8.2 / 2007-4-11
848
+
849
+ * 1 major enhancement:
850
+ * Oracle unit tests!! [Darrin Holst]
851
+ * And they work too
852
+
853
+ == 0.8.1 / 2007-4-10
854
+
855
+ * 1 bug fix:
856
+ * Fixed the distinct(count) for oracle (removed 'as')
857
+
858
+ == 0.8.0 / 2007-4-6
859
+
860
+ * 1 major enhancement:
861
+ * Support for calcualtions on associations
862
+ * 2 new DB supported:
863
+ * Tests run on sqlite
864
+ * Tests run on postgresql
865
+ * History.txt to keep track of changes like these
866
+ * Using Hoe for Rakefile
867
+ * Website generator rake tasks
868
+
869
+ == 0.3.3
870
+ * id=
871
+ * create now work
872
+
873
+ == 0.1.4
874
+ * it was important that #{primary_key} for composites --> 'key1,key2' and not 'key1key2' so created PrimaryKeys class
875
+
876
+ == 0.0.1
877
+ * Initial version
878
+ * set_primary_keys(*keys) is the activation class method to transform an ActiveRecord into a composite primary key AR
879
+ * find(*ids) supports the passing of
880
+ * id sets: Foo.find(2,1),
881
+ * lists of id sets: Foo.find([2,1], [7,3], [8,12]),
882
+ * and even stringified versions of the above:
883
+ * Foo.find '2,1' or Foo.find '2,1;7,3'