salesforce-orm 1.2.4 → 1.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/salesforce-orm/object_base.rb +31 -10
- data/lib/salesforce-orm/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8e15c2e92db3f6c373dd24b862cb718645479bc
|
4
|
+
data.tar.gz: 67f8ba56e368b6cefb59beaeb9edc161cffb288d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d9984a9349599edcd21bb275bbc2dc020ab6fdee3aed37cbd0718c06387834f93643f29bfd4e04fa4be8fad931a6bb5b948e12b4d6da9fa3b7f82b3d8b41347
|
7
|
+
data.tar.gz: 4c0c7d67b0a08a1c9859f1c5f9acedb5abf948574fcef77b5668c07b885a3e3b964ae32ec28096d9300d2e2172ad10cf3020cae89fcd5056cf21b22183e4f41d
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -189,6 +189,8 @@ SampleObject.find_by_field_one_and_field_two_and_field_three(1, 2, 3)
|
|
189
189
|
SampleObject.select('count(id)').all
|
190
190
|
```
|
191
191
|
|
192
|
+
**NOTE: Salesforce API's accepts SOQL query as a URL params, so make sure URL length is not longer than 16087 chars**
|
193
|
+
|
192
194
|
Instance methods
|
193
195
|
|
194
196
|
```
|
@@ -72,16 +72,37 @@ module SalesforceOrm
|
|
72
72
|
def inspect
|
73
73
|
to_h
|
74
74
|
end
|
75
|
-
end
|
76
75
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
76
|
+
# marshal_dump and marshal_load is a fix for unable to cache object of this class.
|
77
|
+
# This is a temporary solution. Once Restforce::Mash fix this issue, we'll revert this change
|
78
|
+
|
79
|
+
def marshal_dump
|
80
|
+
h = to_h
|
81
|
+
if h[:attributes]
|
82
|
+
h[:attributes] = h[:attributes].clone
|
83
|
+
h[:attributes].instance_variable_set(:@client, nil)
|
84
|
+
end
|
85
|
+
|
86
|
+
if h[:original_object]
|
87
|
+
h[:original_object] = h[:original_object].clone
|
88
|
+
h[:original_object].instance_variable_set(:@client, nil)
|
89
|
+
|
90
|
+
if h[:original_object]['attributes']
|
91
|
+
h[:original_object]['attributes'] = h[:original_object]['attributes'].clone
|
92
|
+
h[:original_object]['attributes'].instance_variable_set(:@client, nil)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
h
|
96
|
+
end
|
97
|
+
|
98
|
+
def marshal_load(data)
|
99
|
+
result = super(data)
|
100
|
+
|
101
|
+
attributes.instance_variable_set(:@client, RestforceClient.instance) if attributes
|
102
|
+
original_object.instance_variable_set(:@client, RestforceClient.instance) if original_object
|
103
|
+
original_object.attributes.instance_variable_set(:@client, RestforceClient.instance) if original_object && original_object.attributes
|
104
|
+
|
105
|
+
result
|
106
|
+
end
|
86
107
|
end
|
87
108
|
end
|