composite_primary_keys 12.0.9 → 14.0.1

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