composite_primary_keys 13.0.1 → 13.0.2

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