switchman 3.5.15 → 3.5.16
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/switchman/active_record/associations.rb +9 -1
- data/lib/switchman/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a27299a15c04348fc6a632a8c3c53b8c4fa541140b8befd07f63bc3544f01f50
|
4
|
+
data.tar.gz: d9a43fc82c874a87026c5d0b9467a45ba71df19e0c94166f22cc1aabe11b8e5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2b47b69ec2830ed31204d0fe122d555b9f6623683469d6b35329cc1bfe1a18b6e5ec769985d792f64c72a696a4a16f4119407a9323b2560f4be575f52d5c09b9
|
7
|
+
data.tar.gz: 19bd4da4fa0ba4e4ec03c57858481f6dddd799b98bcd9e67e3870bbfb60c7cb69d44ba74781788c084069dc5bc17632f74b3c793d1964a8ef76122f2f78c144e
|
@@ -331,7 +331,15 @@ module Switchman
|
|
331
331
|
primary_key_foreign_key_pairs = primary_key.zip(foreign_key)
|
332
332
|
primary_key_foreign_key_pairs.each do |pk, fk|
|
333
333
|
# Notable change: add relative_id_for here
|
334
|
-
association_id =
|
334
|
+
association_id = if record.class.sharded_column?(pk)
|
335
|
+
Shard.relative_id_for(
|
336
|
+
record._read_attribute(pk),
|
337
|
+
record.shard,
|
338
|
+
shard
|
339
|
+
)
|
340
|
+
else
|
341
|
+
record._read_attribute(pk)
|
342
|
+
end
|
335
343
|
self[fk] = association_id unless self[fk] == association_id
|
336
344
|
end
|
337
345
|
association.loaded!
|
data/lib/switchman/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: switchman
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2023-10-
|
13
|
+
date: 2023-10-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|