composite_primary_keys 8.1.0 → 8.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/History.rdoc +642 -625
  3. data/README.rdoc +5 -2
  4. data/lib/composite_primary_keys.rb +115 -115
  5. data/lib/composite_primary_keys/associations/association.rb +23 -23
  6. data/lib/composite_primary_keys/associations/association_scope.rb +73 -73
  7. data/lib/composite_primary_keys/associations/collection_association.rb +14 -14
  8. data/lib/composite_primary_keys/associations/has_many_association.rb +69 -69
  9. data/lib/composite_primary_keys/associations/join_dependency.rb +87 -87
  10. data/lib/composite_primary_keys/associations/preloader/association.rb +90 -90
  11. data/lib/composite_primary_keys/associations/singular_association.rb +18 -18
  12. data/lib/composite_primary_keys/attribute_methods.rb +9 -9
  13. data/lib/composite_primary_keys/attribute_methods/dirty.rb +29 -29
  14. data/lib/composite_primary_keys/attribute_methods/read.rb +24 -24
  15. data/lib/composite_primary_keys/attribute_methods/write.rb +30 -30
  16. data/lib/composite_primary_keys/attribute_set/builder.rb +19 -19
  17. data/lib/composite_primary_keys/base.rb +129 -135
  18. data/lib/composite_primary_keys/composite_arrays.rb +43 -43
  19. data/lib/composite_primary_keys/connection_adapters/abstract/connection_specification_changes.rb +2 -3
  20. data/lib/composite_primary_keys/core.rb +60 -60
  21. data/lib/composite_primary_keys/persistence.rb +56 -56
  22. data/lib/composite_primary_keys/relation.rb +68 -68
  23. data/lib/composite_primary_keys/relation/calculations.rb +78 -78
  24. data/lib/composite_primary_keys/relation/finder_methods.rb +179 -179
  25. data/lib/composite_primary_keys/sanitization.rb +52 -52
  26. data/lib/composite_primary_keys/validations/uniqueness.rb +36 -36
  27. data/lib/composite_primary_keys/version.rb +8 -8
  28. data/tasks/databases/sqlserver.rake +27 -27
  29. data/test/abstract_unit.rb +114 -113
  30. data/test/connections/databases.example.yml +25 -25
  31. data/test/connections/native_sqlserver/connection.rb +11 -11
  32. data/test/fixtures/db_definitions/mysql.sql +218 -218
  33. data/test/fixtures/db_definitions/postgresql.sql +220 -220
  34. data/test/fixtures/db_definitions/sqlite.sql +206 -206
  35. data/test/fixtures/db_definitions/sqlserver.drop.sql +91 -91
  36. data/test/fixtures/db_definitions/sqlserver.sql +226 -226
  37. data/test/fixtures/employee.rb +11 -11
  38. data/test/fixtures/salary.rb +5 -5
  39. data/test/test_associations.rb +341 -340
  40. data/test/test_attributes.rb +60 -60
  41. data/test/test_create.rb +157 -157
  42. data/test/test_delete.rb +158 -158
  43. data/test/test_delete_all.rb +33 -28
  44. data/test/test_enum.rb +21 -21
  45. data/test/test_equal.rb +26 -26
  46. data/test/test_find.rb +119 -118
  47. data/test/test_habtm.rb +117 -113
  48. data/test/test_polymorphic.rb +27 -26
  49. data/test/test_tutorial_example.rb +25 -25
  50. metadata +44 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbf168474ed65f8ab1b123eec93d3e63fa218e8a
4
- data.tar.gz: 4e3168853f10d4bd5fd564e6beb27972dbee0588
3
+ metadata.gz: ac219a8f2d8b68052ff1719a9ac2b9f115a20c6e
4
+ data.tar.gz: 7d2524dcb34b125090e65d428ec9c86458df5c22
5
5
  SHA512:
6
- metadata.gz: 5e486302769c4f5fab7270a6f3ca684bfdbf1826aa7ae16d9a11b0d4883ab97d93361bb22dff69389c1f2eabc133a201b4f1a4b1150b371f73d4bb16f5d32cb4
7
- data.tar.gz: 2d740b4e57d3f206956b202cfbde77b0acb550da97c14d717369c06666c1dfa9098ad8a5159bfa40826f124161c637870b3a61d624a68d5e83ae7276571e3d73
6
+ metadata.gz: b586736b9fa329e675e7809ac949fd91949627f48935208119fae5a32a56f7c0d1dbf93395403eee246ede367c9d4fa9fa575c25bf54b2ff5f9825539af96c11
7
+ data.tar.gz: ba237055b960bd8c68dbf602d8a9c6b2e3419938c4d8ddc4884caf6cd61f7098b4bd95eeb008e33613a21f30029dc7f2d703dc60d2635f1409e867e951c8c688
@@ -1,625 +1,642 @@
1
- == 8.1.0 (2014-03-23)
2
-
3
- * ActiveRecord 4.2.1 support (Charlie Savage)
4
- * Change parsing of composite ids to fix #290 (Charlie Savage)
5
- * Add sqlserver setting for test suite (Joachim Herb)
6
- * Fix sqlserver adapater, isse #224 (Joachim Herb)
7
- * Update readme file to include version 8.* information (David Silva)
8
-
9
-
10
- == 8.0.1 (2014-01-24)
11
-
12
- * Support optimistic lock and lock_version added to existing fixtures (Kirika)
13
-
14
- == 8.0.0 (2014-01-10)
15
-
16
- * ActiveRecord 4.2.* support (Sammy Larbi)
17
-
18
- == 7.0.13 (2015-01-24)
19
-
20
- * Support optimistic lock and lock_version added to existing fixtures (Kirika)
21
- * README change to convey finding available versions (Aaron Bartell)
22
- * Fixes indentation in product_tariffs (Zaldabus)
23
-
24
- == 7.0.12 (2014-11-09)
25
-
26
- * ActiveRecord 4.1.7 support (Tom Hughes)
27
- * Extract CPK methods to its own module and extending instead of opening the singleton class
28
- which fixes Marshal#dump (Nicolás Hock Isaza)
29
-
30
- == 7.0.11 (2014-10-10)
31
-
32
- * ActiveRecord 4.1.6 support (Tom Hughes, Charlie Savage)
33
- * Verify MariaDB support and update docs (Isi Robayna)
34
- * Postgresql binary column support (Piotr Gębala)
35
- * Fix deleting of records from collection association (akeuk and Charlie Savage)
36
- * Fix invalid include (shiro16)
37
- * Improve tests (Yann Marquet)
38
-
39
- == 7.0.10 (2014-08-07)
40
-
41
- * Update attribute dirty methods to allow attribute *_was
42
- fields to be calculated correctly for enum fields (Zachary Salzbank)
43
- * Update read/write methods to match latest version of ActiveRecord (Charlie Savage)
44
-
45
- == 7.0.9 (2014-08-03)
46
-
47
- * Second attemp at fixing instantiation of has_many records via :includes that use composite keys - this
48
- time take into account no target records (Charlie Savage)
49
-
50
- == 7.0.8 (2014-08-03)
51
-
52
- * Fix instantiation of has_many records via :includes that use composite keys (Charlie Savage)
53
-
54
- == 7.0.7 (2014-07-29)
55
-
56
- * Add back support for calling find like this (Sammy Larbi):
57
-
58
- Membership.find('1,1')
59
-
60
- == 7.0.7 (2014-07-29)
61
-
62
- * Add back support for calling find like this (Sammy Larbi):
63
-
64
- Membership.find('1,1')
65
-
66
- == 7.0.6 (2014-07-22)
67
-
68
- * Change the way we override ActiveRecord::Persistence to call sequence of included modules such
69
- as callbacks (Charlie Savage)
70
-
71
- == 7.0.5 (2014-07-21)
72
-
73
- * Remove overriden Postgresql adapter code (Charlie Savage)
74
-
75
- == 7.0.4 (2014-07-09)
76
-
77
- * Fix overriding of Relation#where_values_hash (Pavel)
78
- * Add travis CI support (Pavel)
79
- * Run AR's original relation_for_destroy when primary key is not composite (Pavel)
80
-
81
- == 7.0.3 (2014-07-04)
82
-
83
- * Fixes for Rails 4.1.2+ compatibility (Tom Hughes)
84
- * Nested attribute fix (Sammy Larb)
85
- * Test fixes (Sammy Larb)
86
- * Fixes instantiating join records (Charlie Savage)
87
-
88
- == 7.0.2 (2014-06-01)
89
-
90
- * Fix id_was when one of the column names is called id (Adrian Hooper)
91
- * Fix queries that use ActiveRecord objects in the where clause (Adrian Hooper)
92
-
93
- == 7.0.1 (2014-05-27)
94
-
95
- * Fix setting of timestamps automatically by Rails (Charlie Savage)
96
-
97
- == 7.0.0 (2014-05-26)
98
-
99
- * Active Record 4.1 support! (Charlie Savage, Tom Hughes, Simon South)
100
-
101
- Note there is one big api change. Previously, CPK supported both of these calls:
102
-
103
- Membership.find(1,1)
104
- Membership.find([1,1])
105
-
106
- The first one no longer works. It was removed because it made the internal code simpler
107
- and makes the intention of the code clearer (especially when finding multiple records).
108
- If this change causes too much pain then please submit a ticket on Github.
109
-
110
- == 6.0.08 (2015-01-24)
111
-
112
- * Fix habtm association #delete_records (Uros Jurglic)
113
- * Support optimistic locking (Toshio Maki)
114
- * Remove singleton classes on CPK relations (Nicolás Hock Isaza)
115
-
116
- == 6.0.7 (2014-10-06)
117
-
118
- * Support Rails 4.0.6 (Tom Hughes)
119
-
120
- == 6.0.6 (2014-05-26)
121
-
122
- * Don't refer to deprecated set_primary_keys in README (Henare Degan)
123
- * Fix gemspec dependency (Charlie Savage)
124
-
125
- == 6.0.5 (2014-05-20)
126
-
127
- * Removed debugging output (Dan Draper)
128
- * Fixes to ensure that has_one associations work correctly (Dan Draper)
129
- * Fix postgres db migration failure since no result is returned in some cases (seashell-qd)
130
- * Fix exception raised in method "id=" (seashell.qd@hotmail.com)
131
-
132
- == 6.0.3 (2014-04-28)
133
-
134
- * Fixes setting of primary key when CPK is not used for a given model (see #191)
135
-
136
- == 6.0.2 (2014-04-28)
137
-
138
- * Fixes relating to ActiveRecord 4.0.x compatibility (Dan Draper)
139
- * Ensure that primary key is set on instance when creating new records (Dan Draper)
140
-
141
- == 6.0.1 (2013-11-29)
142
-
143
- * Handle records == :all in HasManyAssociation#delete_records. Without this calling
144
- delete or clear on a has_many assocation can result in an exception (Tom Hughes)
145
- * Don't include cpk key as an attributes - fixes json serialization - #168 (Charlie Savage)
146
- * Fix tests running on ruby 1.9.3 (Charlie Savage)
147
- * Update nested_attributes to work with activerecord 4.0.x (Nick DeLuca)
148
-
149
- == 6.0.0 (2013-08-04)
150
- * ActiveRecord 4.0 support (Sammy Larbi)
151
-
152
- == 5.0.13 2013-04-27
153
- * Batch query improvements (Jordan Byron)
154
- * Support nested attributes (aiasfina and Charlie Savage)
155
-
156
- == 5.0.12 2013-01-21
157
- * Fix HasManyAssociation foreign_key_present? method to work with non CPK assocations (Charlie Savage)
158
-
159
- == 5.0.11 2013-01-19
160
- * Patch HasManyAssociation foreign_key_present? method to work with array of keys (tbeauvais)
161
- * Patch reverse_sql_order method to break apart CPKs (tbeauvais)
162
- * Add test and fix for nested_attributes update (Dinshaw Gobhai)
163
- * Add test and fix for to_sym exception (Dinshaw Gobhai)
164
- * Add missing timestamp columns for mysql test_touch.rb (Dinshaw Gobhai)
165
-
166
- == 5.0.10 2012-11-21
167
- * ActiveRecord 3.2.9 compatability (Tom Hughes, Chris Heald, Jack Tang)
168
- * Add support for find_in_batches (Charlie Savage)
169
- * Add support for touch method (Macario Ortega)
170
- * Remove symbolized representation of primary keys to be consistent with ActiveRecord (Tiago Cardoso)
171
- * Update destroy method to use hash of primary keys over an array. This allows the proper SQL
172
- (using IS NULL) to be generated when one of the primary key attributes is nil (Scott Hunter).
173
-
174
- == 5.0.9 2012-09-29
175
- * Enable tests for MS SQL Servder (Enderson Maia)
176
- * Update ActiveRecord::Base#initialize_dup override in line with ActiveRecord::Base 3.2.5+ (Lucas Maxwell)
177
- * Require postgresql_adapter.rb also when using activerecord-postgis-adapter (Torsti Schulz)
178
- * Make cpk_in_predicate build a simple IN when possible (Tom Hughes)
179
- * Fixed problem loading jdbcpostgresql adapter (Troy Caldwell)
180
- * Add support for counter cache (Charlie Savage)
181
- * Fix recreating postgresql database (Charlie Savage)
182
- * Update dependency to ActiveRecord 3.2.8 or higher (Charlie Savage)
183
-
184
- == 5.0.8 2012-07-01
185
- * Enabled tests for MS SQL Server (Enderson Maia)
186
- * Update establish_connection to work with Rails 3.2.6 (Ivan Schneider)
187
- * Fix typos in rake tasks names in README_tests.rdoc (Ivan Schneider)
188
- * Fix problem with deleting non-CPK in Rails 3.2.5 (Sammy Larbi)
189
- * Fixes relationship deletion for HABTM in Rails when it passes :all flag instead of
190
- an array of IDs. Also adds new tests and test fixtures (Sammy Larbi)
191
- * Change mysql db creation to execute one statement each time, since in some setups
192
- it will not run multiple statements (Sammy Larbi)
193
- * Fix multiple assignments to same column due to duplicate keys in @changed_attributes.
194
- Includes test fixes (Jan Vlnas)
195
-
196
- == 5.0.7 2012-06-03
197
- * Fixed bug where validates_uniqueness failed for 3 or more primary keys. (Charlie Savage)
198
-
199
- == 5.0.6 2012-05-20
200
- * Fixed bug where setting a belongs_to association to nil would raise an error (Tyler Rick)
201
- * Remove special case code for 1 column selects and just choose to use Rails version of the
202
- method unless we need ours to deal with an Array (Sammy Larbi)
203
- * Change count tests to actually check for distinct, fix resulting error it
204
- demonstrated in the code (Sammy Larbi)
205
- * Specify mysql2 driver by default (Charlie Savage)
206
- * Update sqlite tests to run on Windows (Charlie Savage)
207
-
208
- == 5.0.5 2012-05-05
209
- * Count without slower subquery in cases where that is possible (Sammy Larbi)
210
- * When you call association.build for a has_many association that uses a
211
- composite foreign key, the newly built child record should have the values
212
- in its belongs_to foreign_key populated from its owner's values (Tyler Rick).
213
- * Removed test_has_many_with_primary_key method that wasn't being used because
214
- another method by the same name was defined below it (Tyler Rick).
215
- * Fixed a bug that was causing object.changes to raise TypeError (Tyler Rick)
216
- * Fix error when running rake mysql:rebuild_databases (Tyler Rick)
217
- * to_param should join with comma instead of minus sign (Tsutomu Kuroda)
218
- * Fix the "Factories" section of README.rdoc (Tsutomu Kuroda)
219
-
220
- == 5.0.4 2012-03-23
221
- * Update ActiveRecord::AttributeMethods#Write for Rails 3.2.2 (Travis Warlick)
222
-
223
- == 5.0.4 2012-03-23
224
- * Yanked
225
-
226
- == 5.0.2 2012-03-16
227
- * Use .rdoc extension on RDoc files (Elia Schito)
228
- * Update documentation to use self.primary_keys instead of set_primary_keys (Miguel Fonseca)
229
- * Added tests for comparing composite ids (Jim Jones)
230
- * Updating the README for clarity (Brett Fishman)
231
- * Fix method signature mismatch with active_record (Miguel Fonseca)
232
- * Fix ref in README (Elia Schito)
233
- * Add test for habm create (Charlie Savage)
234
-
235
- == 5.0.1 2012-02-13
236
- * Fix deprecation warning that was exactly backwards (Tom Hughes)
237
- * Fix primary_keys handling in models that inherit from other models
238
- but don't redefine their primary_key. Problem was the inherited
239
- models didn't correctly reference their parents primary_keys (Charlie Savage)
240
-
241
- == 5.0.0 2012-02-12
242
- * Fix tests so they pass on MySql (Charlie Savage)
243
- * Fix calculations to work with duplicate column names (cleesmith)
244
- * Switch rake tasks for Postgresql and MySql to use ActiveRecord API for
245
- creating and dropping databases (Charlie Savage)
246
- * Follow AR 3.2 lead and introduce self.primary_keys and deprecate set_primary_keys (Charlie Savage)
247
- * Switch from set_primary_key to self.primary_key= to avoid Rails deprecation (Charlie Savage)
248
- * Fix issue when using multiple database connections (David Doan)
249
- * Fix homepage in gemspec and remove email address (Charlie Savage)
250
- * Add support for string keys to exists? (Jan Vlnas)
251
- * Fix typo (Jason Karns)
252
-
253
- == 5.0.0.rc1 2012-01-16
254
- * ActiveRecord 3.2 support
255
-
256
- == 4.1.2 2012-01-12
257
- * Helper to allow the same tests to be used for both Oracle and other DBs
258
- by replacing quoted identifiers with all-caps equivalents on Oracle (Rhett Sutphin)
259
- * Update Oracle tests (Rhett Sutphin)
260
-
261
- == 4.1.1 2011-08-31
262
- * Support for AR 3.1.1
263
- * Make polymorphic belongs_to work in rails 3.1.1 (Tom Hughes)
264
- * Eliminate relative paths from the test suite (Rhett Sutphin)
265
- * Minor improvements to the CPK test runner w/o relative path changes (Rhett Sutphin)
266
- * Remove stray puts (Rhett Sutphin)
267
- * Allow AR logs to go to a file when running tests. This commit allows you to
268
- specify a file to use instead via the CPK_LOGFILE environment variable.
269
- STDOUT is still the default. (Rhett Sutphin)
270
- * Use ADAPTER env variable to select database to test. For example:
271
-
272
- ADAPTER=sqlite3 ruby test/test_suite.rb
273
- (Rhett Sutphin)
274
-
275
- * Eliminate constant redef warnings during test runs (Rhett Sutphin)
276
- * Add missing fixture declarations (Rhett Sutphin)
277
- * Standardize on integer PKs in polymorphic fixtures (Rhett Sutphin)
278
- * Fix tiny file name typos (Buck)
279
-
280
- == 4.0.0 2011-08-31
281
- * Support for AR 3.1
282
-
283
- == 4.0.0.beta9 2011-08-22
284
- * Fix eager-loading in AR 3.1.rc6.
285
-
286
- == 4.0.0.beta9 2011-082-22
287
- * Fix eager-loading in AR 3.1.rc6.
288
-
289
- == 4.0.0.beta8 2011-082-22
290
- * Sqlite 3 fixes (Jan Vlnas)
291
- * Fixes for to_key method (Jan Vlnas)
292
- * Compatible with Rails 3.1 RC6 (Ari Epstein, Travis Warlick)
293
-
294
- == 4.0.0.beta7 2011-07-26
295
- * Compatible with Rails 3.1 RC5 (TycoooN)
296
- * Do not use Arel::Nodes::Or to combine predicates because it creates a
297
- deeply nested stack that blows up.
298
-
299
- == 4.0.0.beta4 2011-07-22
300
- * Compatible with Rails 3.1 stable branch. No longer works with RC4 (Charlie Savage)
301
- * Do not require loading of postgresql gem unless needed (Charlie Savage)
302
-
303
- == 4.0.0.beta3 2011-07-08
304
- * Fix the ability to update the values of a primary key (Travis Warlick)
305
- * Support port and host configurations for postgres rake tasks (Travis Warlick)
306
-
307
- == 4.0.0.beta2 2011-06-21
308
- * ActiveRecord 3.1 RC4 compatibility.
309
- * Fix instantiation of CPK models with included associations
310
-
311
- == 4.0.0.beta1 2011-06-09
312
- * ActiveRecord 3.1 RC1 compatibility. This required a significant rewrite due to
313
- all the changes in AR 3.1 versus 3.0.
314
-
315
- == 3.1.11 2012-05-20
316
- Fix AssociationReflection#derive_primary_key for belongs_to relationships (Heinrich Lee Yu).
317
-
318
- == 3.1.10 2011-07-08
319
- * Bugfix for belongs_to with includes (John Ash)
320
- * Improved tests for calling clear on a habtm association, which involved (David Rueck)
321
- * Fixed bug that resulted in unrelated records being deleted when calling (David Rueck)
322
- * Output deprecation warnings about extra columns in join table CPK-aware (David Rueck)
323
-
324
-
325
- == 3.1.9 2011-06-04
326
- * Improve HABTM association tests (David Rueck)
327
- * Remove deprecated Rake tasks (Charlie Savage)
328
-
329
- == 3.1.8 2011-05-26
330
- * Fix calling clear on a HABTM associate (David Rueck)
331
-
332
- == 3.1.7 2011-05-26
333
- * Support regular AR models having one or many composite models (Jacques Fuentes)
334
- * Minor test cleanup (Charlie Savage)
335
- * Make version requirements more explicit (Charlie Savage)
336
- * Remove Arel extensions used for calculations (Charlie Savage)
337
- * Fix test that included wrong error constant
338
-
339
- == 3.1.6 2011-04-03
340
- * Updated belongs_to association to be a bit more flexible with non-CPK (Charlie Savage)
341
- base models (Jacques Fuentes)
342
- * Fix uniqueness check (David Rueck)
343
- * Fix write issue when one of they keys in a composite key is
344
- called id (Tom Hughes)
345
-
346
-
347
- == 3.1.5 2011-03-24
348
- * Fix simple calculation methods (Charlie Savage)
349
- * Fix instantiation of cpk records via associations (Charlie Savage)
350
- * Fix Relation#delete (Charlie Savage)
351
- * Fix Relation#destroy (Charlie Savage)
352
-
353
-
354
- == 3.1.4 2011-03-06
355
- * Support ActiveRecord 3.0.5 - interpolate_sql was removed and
356
- replaced by interpolate_and_sanitize_sql (Charlie Savage)
357
- * Fix persistence methods to support destroy callbacks (Charlie Savage)
358
- * Support rake 0.9.0 beta (Charlie Savage)
359
-
360
-
361
- == 3.1.2 2011-02-26
362
- * Add back in support for find('3,3') which makes it possible to
363
- do find(params[id]). This implementation is simpler than earlier version
364
- improving code readability.
365
- * Support for finding multiple records either via find([1,2], [3,4])
366
- * Remove to_composite_ids method which is no longer needed
367
-
368
-
369
- == 3.1.1 2011-02-07
370
- * Implement id_before_type_cast (Jason Lewis)
371
- * Add in tests for Model.includes(:other_model)
372
- * Fix object comparison with nil in composite primary keys (StackNG)
373
- * Make it easier to run tests with different database adapters (Toby Cabot)
374
- * Fix AssociationReflection#primary_key_name for polymorphic relationships (Dave Doan)
375
-
376
-
377
- == 3.1.0 2010-12-17
378
- * Add back in rake test tasks (Toby Cabot)
379
- * Add support for multiple string composite keys (wouter)
380
- * Remove support for find('3,3'). Instead use find([3,3])
381
-
382
-
383
- == 3.0.9 2010-12-04
384
- * Fix up support for composite key fixtures.
385
-
386
-
387
- == 3.0.8 2010-12-04
388
- * Fix for translation issue in unique validation. Thanks to Daniel Berger for the patch.
389
- * Fix to support child classes of composite primary key models
390
-
391
-
392
- == 3.0.7 2010-11-29
393
- * Fix has and belongs to many associations implementation.
394
-
395
-
396
- == 3.0.6 2010-11-29 (yanked)
397
- * Add full support for has and belongs to many associations.
398
-
399
-
400
- == 3.0.5 2010-11-28 (yanked)
401
- * Apply patch from Marian Rudzynski for fixing up attribute_methods/primary_key
402
- * Apply patch from Toby Cabot to fix up various sqlite3 issues
403
- * Add partial support for has and belongs to many associations. Currently a cpk model
404
- can have a habtm, but a normal model cannot have a habtm to a cpk model (its actually
405
- not too hard to add, but one step at a time...)
406
-
407
-
408
- == 3.0.4 2010-11-21
409
- * Support deleting records when dependent is set to :delete_all
410
- * Switch the method #id to return a CompositeKeys instance (thus going back to how
411
- this was done in previous CPK versions)
412
-
413
-
414
- == 3.0.3 2010-11-19
415
- * Support ActiveRecord 3.0.3 and Arel 2+
416
- * Require ActiveRecord 3.0.3 as minimum dependency
417
- * Fix double quoting issue with table names - thanks to Kevin Motschiedler for a patch.
418
- * Fix SQLiteAdapter class inheritance issue - thanks to Brandon Hauff for a patch.
419
-
420
-
421
- == 3.0.1.b3 2010-11-07
422
-
423
- * Fix bug in joining to :has_one association
424
- * Added support for Model.find(:last)
425
- * Added support for finding via associations with
426
- limited ids. For example find(:include => :foo, :limit => 1)
427
-
428
- == 3.0.1.b2 2010-11-06
429
-
430
- * Port to Rails 3.0 and Ruby 1.9.2
431
-
432
- * Backwards compatability issues
433
- + You can no longer define a composite primary key with a single field. If you
434
- try, your model will just default to a standard active record model. Removing
435
- this corner case simplified the code.
436
- + Removed CompositePrimaryKeys::CompositeKeys. This was done so that the #to_s
437
- method on composite ids, such as [1,2], returns "[1, 2]". This in turns
438
- reduces the amount of core Rails code that needs to be overridden.
439
- + Setting attribute values by string is no longer supported. For example, this
440
- no longer works:
441
- my_record[[:main_id, :secondary_id]] = '1,2'
442
- Instead, do this:
443
- my_record[[:main_id, :secondary_id]] = [1,2]
444
- Once again, this was done to reduce the amount of overridden Rails code
445
- + At the moment, complex finds with nested arrays do not work. For example
446
- find([[1,2], [3,4]))
447
- + Count methods no longer work. For example, Tariff.count(:include => :product_tariffs)
448
- in the TestAssociations#test_count test returns an error. This is because Rails 3.0
449
- uses Arel to perform such calculations, and its not obvious (at least to me) how to
450
- hook into this new mechanism to support tables with composite keys.
451
- + The TestPolymorphic#test_polymorphic_has_many_through is currently failing, but this
452
- looks like an ActiveRecord 3.0 bug to me.
453
-
454
- == 2.3.5.1 2010-02-13
455
-
456
- * Resolved "warning: already initialized constant HasManyThroughCantAssociateThroughHasManyReflection" [Titi Ala'ilima]
457
-
458
- == 2.3.5 2009-12-16
459
-
460
- * Fixed several bugs in has_one and has_many associations when :primary_key specified [kpumuk]
461
-
462
- == 2.3.2 2009-07-16
463
-
464
- * explicitly load associations.rb due to some getting an unitialized constant error
465
-
466
- == 2.3.2 2009-05-28
467
-
468
- * get tests working again with AR 2.3.2
469
-
470
- == 2.2.1 2009-01-21
471
-
472
- * fix ActiveRecord#exists? to work when passing conditions instead of ids
473
-
474
- == 2.2.0 2008-10-29
475
-
476
- * Rails 2.2.0 compatibility
477
-
478
- == 1.1.0 2008-10-29
479
-
480
- * fixes to get cpk working for Rails 2.1.2
481
-
482
- == 1.0.10 2008-10-22
483
-
484
- * add composite key where clause creator method [timurv]
485
-
486
- == 1.0.9 2008-09-08
487
-
488
- * fix postgres tests
489
- * fix for delete_records when has_many association has composite keys [darxriggs]
490
- * more consistent table/column name quoting [pbrant]
491
-
492
- == 1.0.8 2008-08-27
493
-
494
- * fix has_many :through for non composite models [thx rcarver]
495
-
496
- == 1.0.7 2008-08-12
497
-
498
- * fix for the last fix -- when has_many is composite and belongs_to is single
499
-
500
- == 1.0.6 2008-08-06
501
-
502
- * fix associations create
503
-
504
- == 1.0.5 2008-07-25
505
-
506
- * fix for calculations with a group by clause [thx Sirius Black]
507
-
508
- == 1.0.4 2008-07-15
509
-
510
- * support for oracle_enhanced adapter [thx Raimonds Simanovskis]
511
-
512
- == 1.0.3 2008-07-13
513
-
514
- * more fixes and tests for has many through [thx Menno van der Sman]
515
-
516
- == 1.0.2 2008-06-07
517
-
518
- * fix for has many through when through association has composite keys
519
-
520
- == 1.0.1 2008-06-06
521
-
522
- * Oracle fixes
523
-
524
- == 1.0.0 2008-06-05
525
-
526
- * Support for Rails 2.1
527
-
528
- == 0.9.93 2008-06-01
529
-
530
- * set fixed dependency on activerecord 2.0.2
531
-
532
- == 0.9.92 2008-02-22
533
-
534
- * Support for has_and_belongs_to_many
535
-
536
- == 0.9.91 2008-01-27
537
-
538
- * Incremented activerecord dependency to 2.0.2 [thx emmanuel.pirsch]
539
-
540
- == 0.9.90 2008-01-27
541
-
542
- * Trial release for rails/activerecord 2.0.2 supported
543
-
544
- == 0.9.1 2007-10-28
545
-
546
- * Migrations fix - allow :primary_key => [:name] to work [no unit test] [thx Shugo Maeda]
547
-
548
- == 0.9.0 2007-09-28
549
-
550
- * Added support for polymorphs [thx nerdrew]
551
- * init.rb file so gem can be installed as a plugin for Rails [thx nerdrew]
552
- * Added ibm_db support [thx K Venkatasubramaniyan]
553
- * Support for cleaning dependents [thx K Venkatasubramaniyan]
554
- * Rafactored db rake tasks into namespaces
555
- * Added namespaced tests (e.g. mysql:test for test_mysql)
556
-
557
- == 0.8.6 / 2007-6-12
558
-
559
- * 1 emergency fix due to Rails Core change
560
- * Rails v7004 removed #quote; fixed with connection.quote_column_name [thx nerdrew]
561
-
562
- == 0.8.5 / 2007-6-5
563
-
564
- * 1 change due to Rails Core change
565
- * Can no longer use RAILS_CONNECTION_ADAPTERS from Rails core
566
- * 7 dev improvement:
567
- * Changed History.txt syntax to rdoc format
568
- * Added deploy tasks
569
- * Removed CHANGELOG + migrated into History.txt
570
- * Changed PKG_NAME -> GEM_NAME in Rakefile
571
- * Renamed README -> README.txt for :publish_docs task
572
- * Added :check_version task
573
- * VER => VERS in rakefile
574
- * 1 website improvement:
575
- * website/index.txt includes link to "8 steps to fix other ppls code"
576
-
577
- == 0.8.4 / 2007-5-3
578
-
579
- * 1 bugfix
580
- * Corrected ids_list => ids in the exception message. That'll teach me for not adding unit tests before fixing bugs.
581
-
582
- == 0.8.3 / 2007-5-3
583
-
584
- * 1 bugfix
585
- * Explicit reference to ::ActiveRecord::RecordNotFound
586
- * 1 website addition:
587
- * Added routing help [Pete Sumskas]
588
-
589
- == 0.8.2 / 2007-4-11
590
-
591
- * 1 major enhancement:
592
- * Oracle unit tests!! [Darrin Holst]
593
- * And they work too
594
-
595
- == 0.8.1 / 2007-4-10
596
-
597
- * 1 bug fix:
598
- * Fixed the distinct(count) for oracle (removed 'as')
599
-
600
- == 0.8.0 / 2007-4-6
601
-
602
- * 1 major enhancement:
603
- * Support for calcualtions on associations
604
- * 2 new DB supported:
605
- * Tests run on sqlite
606
- * Tests run on postgresql
607
- * History.txt to keep track of changes like these
608
- * Using Hoe for Rakefile
609
- * Website generator rake tasks
610
-
611
- == 0.3.3
612
- * id=
613
- * create now work
614
-
615
- == 0.1.4
616
- * it was important that #{primary_key} for composites --> 'key1,key2' and not 'key1key2' so created PrimaryKeys class
617
-
618
- == 0.0.1
619
- * Initial version
620
- * set_primary_keys(*keys) is the activation class method to transform an ActiveRecord into a composite primary key AR
621
- * find(*ids) supports the passing of
622
- * id sets: Foo.find(2,1),
623
- * lists of id sets: Foo.find([2,1], [7,3], [8,12]),
624
- * and even stringified versions of the above:
625
- * Foo.find '2,1' or Foo.find '2,1;7,3'
1
+ == 8.1.1 (2015-08-04)
2
+
3
+ * Updates to make Travis CI green (Laust Rud Jacobsen)
4
+ * Travis CI support (Laust Rud Jacobsen)
5
+ * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
6
+ for non-peristed objects (Charlie Savage)
7
+ * Update support for Uniquenes validations (Avi Leavitt)
8
+ * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
9
+ * Aligned the establish connection paramater handling to be similar to latest version of rails (Harish Shetty)
10
+
11
+
12
+ == 8.1.0 (2014-03-23)
13
+
14
+ * ActiveRecord 4.2.1 support (Charlie Savage)
15
+ * Change parsing of composite ids to fix #290 (Charlie Savage)
16
+ * Add sqlserver setting for test suite (Joachim Herb)
17
+ * Fix sqlserver adapater, isse #224 (Joachim Herb)
18
+ * Update readme file to include version 8.* information (David Silva)
19
+
20
+ == 8.0.1 (2014-01-24)
21
+
22
+ * Support optimistic lock and lock_version added to existing fixtures (Kirika)
23
+
24
+ == 8.0.0 (2014-01-10)
25
+
26
+ * ActiveRecord 4.2.* support (Sammy Larbi)
27
+
28
+ == 7.0.14 (2015-08-04)
29
+
30
+ * Remove overriden Base#==(comparison_object) which had a different behavior than stock AR method
31
+ for non-peristed objects (Charlie Savage)
32
+ * Update support for Uniquenes validations (Avi Leavitt)
33
+ * Remove call to verify_active_connections! which was removed from AR 4.1 (Steve Pletcher)
34
+
35
+ == 7.0.13 (2015-01-24)
36
+
37
+ * Support optimistic lock and lock_version added to existing fixtures (Kirika)
38
+ * README change to convey finding available versions (Aaron Bartell)
39
+ * Fixes indentation in product_tariffs (Zaldabus)
40
+
41
+ == 7.0.12 (2014-11-09)
42
+
43
+ * ActiveRecord 4.1.7 support (Tom Hughes)
44
+ * Extract CPK methods to its own module and extending instead of opening the singleton class
45
+ which fixes Marshal#dump (Nicolás Hock Isaza)
46
+
47
+ == 7.0.11 (2014-10-10)
48
+
49
+ * ActiveRecord 4.1.6 support (Tom Hughes, Charlie Savage)
50
+ * Verify MariaDB support and update docs (Isi Robayna)
51
+ * Postgresql binary column support (Piotr Gębala)
52
+ * Fix deleting of records from collection association (akeuk and Charlie Savage)
53
+ * Fix invalid include (shiro16)
54
+ * Improve tests (Yann Marquet)
55
+
56
+ == 7.0.10 (2014-08-07)
57
+
58
+ * Update attribute dirty methods to allow attribute *_was
59
+ fields to be calculated correctly for enum fields (Zachary Salzbank)
60
+ * Update read/write methods to match latest version of ActiveRecord (Charlie Savage)
61
+
62
+ == 7.0.9 (2014-08-03)
63
+
64
+ * Second attemp at fixing instantiation of has_many records via :includes that use composite keys - this
65
+ time take into account no target records (Charlie Savage)
66
+
67
+ == 7.0.8 (2014-08-03)
68
+
69
+ * Fix instantiation of has_many records via :includes that use composite keys (Charlie Savage)
70
+
71
+ == 7.0.7 (2014-07-29)
72
+
73
+ * Add back support for calling find like this (Sammy Larbi):
74
+
75
+ Membership.find('1,1')
76
+
77
+ == 7.0.7 (2014-07-29)
78
+
79
+ * Add back support for calling find like this (Sammy Larbi):
80
+
81
+ Membership.find('1,1')
82
+
83
+ == 7.0.6 (2014-07-22)
84
+
85
+ * Change the way we override ActiveRecord::Persistence to call sequence of included modules such
86
+ as callbacks (Charlie Savage)
87
+
88
+ == 7.0.5 (2014-07-21)
89
+
90
+ * Remove overriden Postgresql adapter code (Charlie Savage)
91
+
92
+ == 7.0.4 (2014-07-09)
93
+
94
+ * Fix overriding of Relation#where_values_hash (Pavel)
95
+ * Add travis CI support (Pavel)
96
+ * Run AR's original relation_for_destroy when primary key is not composite (Pavel)
97
+
98
+ == 7.0.3 (2014-07-04)
99
+
100
+ * Fixes for Rails 4.1.2+ compatibility (Tom Hughes)
101
+ * Nested attribute fix (Sammy Larb)
102
+ * Test fixes (Sammy Larb)
103
+ * Fixes instantiating join records (Charlie Savage)
104
+
105
+ == 7.0.2 (2014-06-01)
106
+
107
+ * Fix id_was when one of the column names is called id (Adrian Hooper)
108
+ * Fix queries that use ActiveRecord objects in the where clause (Adrian Hooper)
109
+
110
+ == 7.0.1 (2014-05-27)
111
+
112
+ * Fix setting of timestamps automatically by Rails (Charlie Savage)
113
+
114
+ == 7.0.0 (2014-05-26)
115
+
116
+ * Active Record 4.1 support! (Charlie Savage, Tom Hughes, Simon South)
117
+
118
+ Note there is one big api change. Previously, CPK supported both of these calls:
119
+
120
+ Membership.find(1,1)
121
+ Membership.find([1,1])
122
+
123
+ The first one no longer works. It was removed because it made the internal code simpler
124
+ and makes the intention of the code clearer (especially when finding multiple records).
125
+ If this change causes too much pain then please submit a ticket on Github.
126
+
127
+ == 6.0.08 (2015-01-24)
128
+
129
+ * Fix habtm association #delete_records (Uros Jurglic)
130
+ * Support optimistic locking (Toshio Maki)
131
+ * Remove singleton classes on CPK relations (Nicolás Hock Isaza)
132
+
133
+ == 6.0.7 (2014-10-06)
134
+
135
+ * Support Rails 4.0.6 (Tom Hughes)
136
+
137
+ == 6.0.6 (2014-05-26)
138
+
139
+ * Don't refer to deprecated set_primary_keys in README (Henare Degan)
140
+ * Fix gemspec dependency (Charlie Savage)
141
+
142
+ == 6.0.5 (2014-05-20)
143
+
144
+ * Removed debugging output (Dan Draper)
145
+ * Fixes to ensure that has_one associations work correctly (Dan Draper)
146
+ * Fix postgres db migration failure since no result is returned in some cases (seashell-qd)
147
+ * Fix exception raised in method "id=" (seashell.qd@hotmail.com)
148
+
149
+ == 6.0.3 (2014-04-28)
150
+
151
+ * Fixes setting of primary key when CPK is not used for a given model (see #191)
152
+
153
+ == 6.0.2 (2014-04-28)
154
+
155
+ * Fixes relating to ActiveRecord 4.0.x compatibility (Dan Draper)
156
+ * Ensure that primary key is set on instance when creating new records (Dan Draper)
157
+
158
+ == 6.0.1 (2013-11-29)
159
+
160
+ * Handle records == :all in HasManyAssociation#delete_records. Without this calling
161
+ delete or clear on a has_many assocation can result in an exception (Tom Hughes)
162
+ * Don't include cpk key as an attributes - fixes json serialization - #168 (Charlie Savage)
163
+ * Fix tests running on ruby 1.9.3 (Charlie Savage)
164
+ * Update nested_attributes to work with activerecord 4.0.x (Nick DeLuca)
165
+
166
+ == 6.0.0 (2013-08-04)
167
+ * ActiveRecord 4.0 support (Sammy Larbi)
168
+
169
+ == 5.0.13 2013-04-27
170
+ * Batch query improvements (Jordan Byron)
171
+ * Support nested attributes (aiasfina and Charlie Savage)
172
+
173
+ == 5.0.12 2013-01-21
174
+ * Fix HasManyAssociation foreign_key_present? method to work with non CPK assocations (Charlie Savage)
175
+
176
+ == 5.0.11 2013-01-19
177
+ * Patch HasManyAssociation foreign_key_present? method to work with array of keys (tbeauvais)
178
+ * Patch reverse_sql_order method to break apart CPKs (tbeauvais)
179
+ * Add test and fix for nested_attributes update (Dinshaw Gobhai)
180
+ * Add test and fix for to_sym exception (Dinshaw Gobhai)
181
+ * Add missing timestamp columns for mysql test_touch.rb (Dinshaw Gobhai)
182
+
183
+ == 5.0.10 2012-11-21
184
+ * ActiveRecord 3.2.9 compatability (Tom Hughes, Chris Heald, Jack Tang)
185
+ * Add support for find_in_batches (Charlie Savage)
186
+ * Add support for touch method (Macario Ortega)
187
+ * Remove symbolized representation of primary keys to be consistent with ActiveRecord (Tiago Cardoso)
188
+ * Update destroy method to use hash of primary keys over an array. This allows the proper SQL
189
+ (using IS NULL) to be generated when one of the primary key attributes is nil (Scott Hunter).
190
+
191
+ == 5.0.9 2012-09-29
192
+ * Enable tests for MS SQL Servder (Enderson Maia)
193
+ * Update ActiveRecord::Base#initialize_dup override in line with ActiveRecord::Base 3.2.5+ (Lucas Maxwell)
194
+ * Require postgresql_adapter.rb also when using activerecord-postgis-adapter (Torsti Schulz)
195
+ * Make cpk_in_predicate build a simple IN when possible (Tom Hughes)
196
+ * Fixed problem loading jdbcpostgresql adapter (Troy Caldwell)
197
+ * Add support for counter cache (Charlie Savage)
198
+ * Fix recreating postgresql database (Charlie Savage)
199
+ * Update dependency to ActiveRecord 3.2.8 or higher (Charlie Savage)
200
+
201
+ == 5.0.8 2012-07-01
202
+ * Enabled tests for MS SQL Server (Enderson Maia)
203
+ * Update establish_connection to work with Rails 3.2.6 (Ivan Schneider)
204
+ * Fix typos in rake tasks names in README_tests.rdoc (Ivan Schneider)
205
+ * Fix problem with deleting non-CPK in Rails 3.2.5 (Sammy Larbi)
206
+ * Fixes relationship deletion for HABTM in Rails when it passes :all flag instead of
207
+ an array of IDs. Also adds new tests and test fixtures (Sammy Larbi)
208
+ * Change mysql db creation to execute one statement each time, since in some setups
209
+ it will not run multiple statements (Sammy Larbi)
210
+ * Fix multiple assignments to same column due to duplicate keys in @changed_attributes.
211
+ Includes test fixes (Jan Vlnas)
212
+
213
+ == 5.0.7 2012-06-03
214
+ * Fixed bug where validates_uniqueness failed for 3 or more primary keys. (Charlie Savage)
215
+
216
+ == 5.0.6 2012-05-20
217
+ * Fixed bug where setting a belongs_to association to nil would raise an error (Tyler Rick)
218
+ * Remove special case code for 1 column selects and just choose to use Rails version of the
219
+ method unless we need ours to deal with an Array (Sammy Larbi)
220
+ * Change count tests to actually check for distinct, fix resulting error it
221
+ demonstrated in the code (Sammy Larbi)
222
+ * Specify mysql2 driver by default (Charlie Savage)
223
+ * Update sqlite tests to run on Windows (Charlie Savage)
224
+
225
+ == 5.0.5 2012-05-05
226
+ * Count without slower subquery in cases where that is possible (Sammy Larbi)
227
+ * When you call association.build for a has_many association that uses a
228
+ composite foreign key, the newly built child record should have the values
229
+ in its belongs_to foreign_key populated from its owner's values (Tyler Rick).
230
+ * Removed test_has_many_with_primary_key method that wasn't being used because
231
+ another method by the same name was defined below it (Tyler Rick).
232
+ * Fixed a bug that was causing object.changes to raise TypeError (Tyler Rick)
233
+ * Fix error when running rake mysql:rebuild_databases (Tyler Rick)
234
+ * to_param should join with comma instead of minus sign (Tsutomu Kuroda)
235
+ * Fix the "Factories" section of README.rdoc (Tsutomu Kuroda)
236
+
237
+ == 5.0.4 2012-03-23
238
+ * Update ActiveRecord::AttributeMethods#Write for Rails 3.2.2 (Travis Warlick)
239
+
240
+ == 5.0.4 2012-03-23
241
+ * Yanked
242
+
243
+ == 5.0.2 2012-03-16
244
+ * Use .rdoc extension on RDoc files (Elia Schito)
245
+ * Update documentation to use self.primary_keys instead of set_primary_keys (Miguel Fonseca)
246
+ * Added tests for comparing composite ids (Jim Jones)
247
+ * Updating the README for clarity (Brett Fishman)
248
+ * Fix method signature mismatch with active_record (Miguel Fonseca)
249
+ * Fix ref in README (Elia Schito)
250
+ * Add test for habm create (Charlie Savage)
251
+
252
+ == 5.0.1 2012-02-13
253
+ * Fix deprecation warning that was exactly backwards (Tom Hughes)
254
+ * Fix primary_keys handling in models that inherit from other models
255
+ but don't redefine their primary_key. Problem was the inherited
256
+ models didn't correctly reference their parents primary_keys (Charlie Savage)
257
+
258
+ == 5.0.0 2012-02-12
259
+ * Fix tests so they pass on MySql (Charlie Savage)
260
+ * Fix calculations to work with duplicate column names (cleesmith)
261
+ * Switch rake tasks for Postgresql and MySql to use ActiveRecord API for
262
+ creating and dropping databases (Charlie Savage)
263
+ * Follow AR 3.2 lead and introduce self.primary_keys and deprecate set_primary_keys (Charlie Savage)
264
+ * Switch from set_primary_key to self.primary_key= to avoid Rails deprecation (Charlie Savage)
265
+ * Fix issue when using multiple database connections (David Doan)
266
+ * Fix homepage in gemspec and remove email address (Charlie Savage)
267
+ * Add support for string keys to exists? (Jan Vlnas)
268
+ * Fix typo (Jason Karns)
269
+
270
+ == 5.0.0.rc1 2012-01-16
271
+ * ActiveRecord 3.2 support
272
+
273
+ == 4.1.2 2012-01-12
274
+ * Helper to allow the same tests to be used for both Oracle and other DBs
275
+ by replacing quoted identifiers with all-caps equivalents on Oracle (Rhett Sutphin)
276
+ * Update Oracle tests (Rhett Sutphin)
277
+
278
+ == 4.1.1 2011-08-31
279
+ * Support for AR 3.1.1
280
+ * Make polymorphic belongs_to work in rails 3.1.1 (Tom Hughes)
281
+ * Eliminate relative paths from the test suite (Rhett Sutphin)
282
+ * Minor improvements to the CPK test runner w/o relative path changes (Rhett Sutphin)
283
+ * Remove stray puts (Rhett Sutphin)
284
+ * Allow AR logs to go to a file when running tests. This commit allows you to
285
+ specify a file to use instead via the CPK_LOGFILE environment variable.
286
+ STDOUT is still the default. (Rhett Sutphin)
287
+ * Use ADAPTER env variable to select database to test. For example:
288
+
289
+ ADAPTER=sqlite3 ruby test/test_suite.rb
290
+ (Rhett Sutphin)
291
+
292
+ * Eliminate constant redef warnings during test runs (Rhett Sutphin)
293
+ * Add missing fixture declarations (Rhett Sutphin)
294
+ * Standardize on integer PKs in polymorphic fixtures (Rhett Sutphin)
295
+ * Fix tiny file name typos (Buck)
296
+
297
+ == 4.0.0 2011-08-31
298
+ * Support for AR 3.1
299
+
300
+ == 4.0.0.beta9 2011-08-22
301
+ * Fix eager-loading in AR 3.1.rc6.
302
+
303
+ == 4.0.0.beta9 2011-082-22
304
+ * Fix eager-loading in AR 3.1.rc6.
305
+
306
+ == 4.0.0.beta8 2011-082-22
307
+ * Sqlite 3 fixes (Jan Vlnas)
308
+ * Fixes for to_key method (Jan Vlnas)
309
+ * Compatible with Rails 3.1 RC6 (Ari Epstein, Travis Warlick)
310
+
311
+ == 4.0.0.beta7 2011-07-26
312
+ * Compatible with Rails 3.1 RC5 (TycoooN)
313
+ * Do not use Arel::Nodes::Or to combine predicates because it creates a
314
+ deeply nested stack that blows up.
315
+
316
+ == 4.0.0.beta4 2011-07-22
317
+ * Compatible with Rails 3.1 stable branch. No longer works with RC4 (Charlie Savage)
318
+ * Do not require loading of postgresql gem unless needed (Charlie Savage)
319
+
320
+ == 4.0.0.beta3 2011-07-08
321
+ * Fix the ability to update the values of a primary key (Travis Warlick)
322
+ * Support port and host configurations for postgres rake tasks (Travis Warlick)
323
+
324
+ == 4.0.0.beta2 2011-06-21
325
+ * ActiveRecord 3.1 RC4 compatibility.
326
+ * Fix instantiation of CPK models with included associations
327
+
328
+ == 4.0.0.beta1 2011-06-09
329
+ * ActiveRecord 3.1 RC1 compatibility. This required a significant rewrite due to
330
+ all the changes in AR 3.1 versus 3.0.
331
+
332
+ == 3.1.11 2012-05-20
333
+ Fix AssociationReflection#derive_primary_key for belongs_to relationships (Heinrich Lee Yu).
334
+
335
+ == 3.1.10 2011-07-08
336
+ * Bugfix for belongs_to with includes (John Ash)
337
+ * Improved tests for calling clear on a habtm association, which involved (David Rueck)
338
+ * Fixed bug that resulted in unrelated records being deleted when calling (David Rueck)
339
+ * Output deprecation warnings about extra columns in join table CPK-aware (David Rueck)
340
+
341
+
342
+ == 3.1.9 2011-06-04
343
+ * Improve HABTM association tests (David Rueck)
344
+ * Remove deprecated Rake tasks (Charlie Savage)
345
+
346
+ == 3.1.8 2011-05-26
347
+ * Fix calling clear on a HABTM associate (David Rueck)
348
+
349
+ == 3.1.7 2011-05-26
350
+ * Support regular AR models having one or many composite models (Jacques Fuentes)
351
+ * Minor test cleanup (Charlie Savage)
352
+ * Make version requirements more explicit (Charlie Savage)
353
+ * Remove Arel extensions used for calculations (Charlie Savage)
354
+ * Fix test that included wrong error constant
355
+
356
+ == 3.1.6 2011-04-03
357
+ * Updated belongs_to association to be a bit more flexible with non-CPK (Charlie Savage)
358
+ base models (Jacques Fuentes)
359
+ * Fix uniqueness check (David Rueck)
360
+ * Fix write issue when one of they keys in a composite key is
361
+ called id (Tom Hughes)
362
+
363
+
364
+ == 3.1.5 2011-03-24
365
+ * Fix simple calculation methods (Charlie Savage)
366
+ * Fix instantiation of cpk records via associations (Charlie Savage)
367
+ * Fix Relation#delete (Charlie Savage)
368
+ * Fix Relation#destroy (Charlie Savage)
369
+
370
+
371
+ == 3.1.4 2011-03-06
372
+ * Support ActiveRecord 3.0.5 - interpolate_sql was removed and
373
+ replaced by interpolate_and_sanitize_sql (Charlie Savage)
374
+ * Fix persistence methods to support destroy callbacks (Charlie Savage)
375
+ * Support rake 0.9.0 beta (Charlie Savage)
376
+
377
+
378
+ == 3.1.2 2011-02-26
379
+ * Add back in support for find('3,3') which makes it possible to
380
+ do find(params[id]). This implementation is simpler than earlier version
381
+ improving code readability.
382
+ * Support for finding multiple records either via find([1,2], [3,4])
383
+ * Remove to_composite_ids method which is no longer needed
384
+
385
+
386
+ == 3.1.1 2011-02-07
387
+ * Implement id_before_type_cast (Jason Lewis)
388
+ * Add in tests for Model.includes(:other_model)
389
+ * Fix object comparison with nil in composite primary keys (StackNG)
390
+ * Make it easier to run tests with different database adapters (Toby Cabot)
391
+ * Fix AssociationReflection#primary_key_name for polymorphic relationships (Dave Doan)
392
+
393
+
394
+ == 3.1.0 2010-12-17
395
+ * Add back in rake test tasks (Toby Cabot)
396
+ * Add support for multiple string composite keys (wouter)
397
+ * Remove support for find('3,3'). Instead use find([3,3])
398
+
399
+
400
+ == 3.0.9 2010-12-04
401
+ * Fix up support for composite key fixtures.
402
+
403
+
404
+ == 3.0.8 2010-12-04
405
+ * Fix for translation issue in unique validation. Thanks to Daniel Berger for the patch.
406
+ * Fix to support child classes of composite primary key models
407
+
408
+
409
+ == 3.0.7 2010-11-29
410
+ * Fix has and belongs to many associations implementation.
411
+
412
+
413
+ == 3.0.6 2010-11-29 (yanked)
414
+ * Add full support for has and belongs to many associations.
415
+
416
+
417
+ == 3.0.5 2010-11-28 (yanked)
418
+ * Apply patch from Marian Rudzynski for fixing up attribute_methods/primary_key
419
+ * Apply patch from Toby Cabot to fix up various sqlite3 issues
420
+ * Add partial support for has and belongs to many associations. Currently a cpk model
421
+ can have a habtm, but a normal model cannot have a habtm to a cpk model (its actually
422
+ not too hard to add, but one step at a time...)
423
+
424
+
425
+ == 3.0.4 2010-11-21
426
+ * Support deleting records when dependent is set to :delete_all
427
+ * Switch the method #id to return a CompositeKeys instance (thus going back to how
428
+ this was done in previous CPK versions)
429
+
430
+
431
+ == 3.0.3 2010-11-19
432
+ * Support ActiveRecord 3.0.3 and Arel 2+
433
+ * Require ActiveRecord 3.0.3 as minimum dependency
434
+ * Fix double quoting issue with table names - thanks to Kevin Motschiedler for a patch.
435
+ * Fix SQLiteAdapter class inheritance issue - thanks to Brandon Hauff for a patch.
436
+
437
+
438
+ == 3.0.1.b3 2010-11-07
439
+
440
+ * Fix bug in joining to :has_one association
441
+ * Added support for Model.find(:last)
442
+ * Added support for finding via associations with
443
+ limited ids. For example find(:include => :foo, :limit => 1)
444
+
445
+ == 3.0.1.b2 2010-11-06
446
+
447
+ * Port to Rails 3.0 and Ruby 1.9.2
448
+
449
+ * Backwards compatability issues
450
+ + You can no longer define a composite primary key with a single field. If you
451
+ try, your model will just default to a standard active record model. Removing
452
+ this corner case simplified the code.
453
+ + Removed CompositePrimaryKeys::CompositeKeys. This was done so that the #to_s
454
+ method on composite ids, such as [1,2], returns "[1, 2]". This in turns
455
+ reduces the amount of core Rails code that needs to be overridden.
456
+ + Setting attribute values by string is no longer supported. For example, this
457
+ no longer works:
458
+ my_record[[:main_id, :secondary_id]] = '1,2'
459
+ Instead, do this:
460
+ my_record[[:main_id, :secondary_id]] = [1,2]
461
+ Once again, this was done to reduce the amount of overridden Rails code
462
+ + At the moment, complex finds with nested arrays do not work. For example
463
+ find([[1,2], [3,4]))
464
+ + Count methods no longer work. For example, Tariff.count(:include => :product_tariffs)
465
+ in the TestAssociations#test_count test returns an error. This is because Rails 3.0
466
+ uses Arel to perform such calculations, and its not obvious (at least to me) how to
467
+ hook into this new mechanism to support tables with composite keys.
468
+ + The TestPolymorphic#test_polymorphic_has_many_through is currently failing, but this
469
+ looks like an ActiveRecord 3.0 bug to me.
470
+
471
+ == 2.3.5.1 2010-02-13
472
+
473
+ * Resolved "warning: already initialized constant HasManyThroughCantAssociateThroughHasManyReflection" [Titi Ala'ilima]
474
+
475
+ == 2.3.5 2009-12-16
476
+
477
+ * Fixed several bugs in has_one and has_many associations when :primary_key specified [kpumuk]
478
+
479
+ == 2.3.2 2009-07-16
480
+
481
+ * explicitly load associations.rb due to some getting an unitialized constant error
482
+
483
+ == 2.3.2 2009-05-28
484
+
485
+ * get tests working again with AR 2.3.2
486
+
487
+ == 2.2.1 2009-01-21
488
+
489
+ * fix ActiveRecord#exists? to work when passing conditions instead of ids
490
+
491
+ == 2.2.0 2008-10-29
492
+
493
+ * Rails 2.2.0 compatibility
494
+
495
+ == 1.1.0 2008-10-29
496
+
497
+ * fixes to get cpk working for Rails 2.1.2
498
+
499
+ == 1.0.10 2008-10-22
500
+
501
+ * add composite key where clause creator method [timurv]
502
+
503
+ == 1.0.9 2008-09-08
504
+
505
+ * fix postgres tests
506
+ * fix for delete_records when has_many association has composite keys [darxriggs]
507
+ * more consistent table/column name quoting [pbrant]
508
+
509
+ == 1.0.8 2008-08-27
510
+
511
+ * fix has_many :through for non composite models [thx rcarver]
512
+
513
+ == 1.0.7 2008-08-12
514
+
515
+ * fix for the last fix -- when has_many is composite and belongs_to is single
516
+
517
+ == 1.0.6 2008-08-06
518
+
519
+ * fix associations create
520
+
521
+ == 1.0.5 2008-07-25
522
+
523
+ * fix for calculations with a group by clause [thx Sirius Black]
524
+
525
+ == 1.0.4 2008-07-15
526
+
527
+ * support for oracle_enhanced adapter [thx Raimonds Simanovskis]
528
+
529
+ == 1.0.3 2008-07-13
530
+
531
+ * more fixes and tests for has many through [thx Menno van der Sman]
532
+
533
+ == 1.0.2 2008-06-07
534
+
535
+ * fix for has many through when through association has composite keys
536
+
537
+ == 1.0.1 2008-06-06
538
+
539
+ * Oracle fixes
540
+
541
+ == 1.0.0 2008-06-05
542
+
543
+ * Support for Rails 2.1
544
+
545
+ == 0.9.93 2008-06-01
546
+
547
+ * set fixed dependency on activerecord 2.0.2
548
+
549
+ == 0.9.92 2008-02-22
550
+
551
+ * Support for has_and_belongs_to_many
552
+
553
+ == 0.9.91 2008-01-27
554
+
555
+ * Incremented activerecord dependency to 2.0.2 [thx emmanuel.pirsch]
556
+
557
+ == 0.9.90 2008-01-27
558
+
559
+ * Trial release for rails/activerecord 2.0.2 supported
560
+
561
+ == 0.9.1 2007-10-28
562
+
563
+ * Migrations fix - allow :primary_key => [:name] to work [no unit test] [thx Shugo Maeda]
564
+
565
+ == 0.9.0 2007-09-28
566
+
567
+ * Added support for polymorphs [thx nerdrew]
568
+ * init.rb file so gem can be installed as a plugin for Rails [thx nerdrew]
569
+ * Added ibm_db support [thx K Venkatasubramaniyan]
570
+ * Support for cleaning dependents [thx K Venkatasubramaniyan]
571
+ * Rafactored db rake tasks into namespaces
572
+ * Added namespaced tests (e.g. mysql:test for test_mysql)
573
+
574
+ == 0.8.6 / 2007-6-12
575
+
576
+ * 1 emergency fix due to Rails Core change
577
+ * Rails v7004 removed #quote; fixed with connection.quote_column_name [thx nerdrew]
578
+
579
+ == 0.8.5 / 2007-6-5
580
+
581
+ * 1 change due to Rails Core change
582
+ * Can no longer use RAILS_CONNECTION_ADAPTERS from Rails core
583
+ * 7 dev improvement:
584
+ * Changed History.txt syntax to rdoc format
585
+ * Added deploy tasks
586
+ * Removed CHANGELOG + migrated into History.txt
587
+ * Changed PKG_NAME -> GEM_NAME in Rakefile
588
+ * Renamed README -> README.txt for :publish_docs task
589
+ * Added :check_version task
590
+ * VER => VERS in rakefile
591
+ * 1 website improvement:
592
+ * website/index.txt includes link to "8 steps to fix other ppls code"
593
+
594
+ == 0.8.4 / 2007-5-3
595
+
596
+ * 1 bugfix
597
+ * Corrected ids_list => ids in the exception message. That'll teach me for not adding unit tests before fixing bugs.
598
+
599
+ == 0.8.3 / 2007-5-3
600
+
601
+ * 1 bugfix
602
+ * Explicit reference to ::ActiveRecord::RecordNotFound
603
+ * 1 website addition:
604
+ * Added routing help [Pete Sumskas]
605
+
606
+ == 0.8.2 / 2007-4-11
607
+
608
+ * 1 major enhancement:
609
+ * Oracle unit tests!! [Darrin Holst]
610
+ * And they work too
611
+
612
+ == 0.8.1 / 2007-4-10
613
+
614
+ * 1 bug fix:
615
+ * Fixed the distinct(count) for oracle (removed 'as')
616
+
617
+ == 0.8.0 / 2007-4-6
618
+
619
+ * 1 major enhancement:
620
+ * Support for calcualtions on associations
621
+ * 2 new DB supported:
622
+ * Tests run on sqlite
623
+ * Tests run on postgresql
624
+ * History.txt to keep track of changes like these
625
+ * Using Hoe for Rakefile
626
+ * Website generator rake tasks
627
+
628
+ == 0.3.3
629
+ * id=
630
+ * create now work
631
+
632
+ == 0.1.4
633
+ * it was important that #{primary_key} for composites --> 'key1,key2' and not 'key1key2' so created PrimaryKeys class
634
+
635
+ == 0.0.1
636
+ * Initial version
637
+ * set_primary_keys(*keys) is the activation class method to transform an ActiveRecord into a composite primary key AR
638
+ * find(*ids) supports the passing of
639
+ * id sets: Foo.find(2,1),
640
+ * lists of id sets: Foo.find([2,1], [7,3], [8,12]),
641
+ * and even stringified versions of the above:
642
+ * Foo.find '2,1' or Foo.find '2,1;7,3'