composite_primary_keys 13.0.1 → 13.0.3

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