entity_store_sequel 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6cf0a1b104b44375df19167a445fae8978f191b
|
4
|
+
data.tar.gz: 195a8f25d2ae69e5188b992d845db063af22c5d0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99ac02a565ad9b2b331bd4a607f44cc0032f56a1168039bb98273eaa82838ee9f83241a16ffd34e17ca4abee3103e0e7114d6580c7a6da5cb216f18a13e724c7
|
7
|
+
data.tar.gz: 7822be6aa887bda34c31c9f51fd8069a9d3fedb28bcb9b5584a13946caa3dd8437477639b256cd99bbfaeb53bed9ccaa58fa86f5f1aa1a9ffeb0283641c99d90
|
@@ -120,7 +120,7 @@ module EntityStoreSequel
|
|
120
120
|
:_type => event.class.name,
|
121
121
|
:_entity_id => BSON::ObjectId.from_string(event.entity_id).to_s,
|
122
122
|
:entity_version => event.entity_version,
|
123
|
-
:data => PigeonHole.generate(event.attributes),
|
123
|
+
:data => PigeonHole.generate(hash_without_keys(event.attributes, :entity_id)),
|
124
124
|
}
|
125
125
|
events.insert(doc)
|
126
126
|
end
|
@@ -215,6 +215,7 @@ module EntityStoreSequel
|
|
215
215
|
|
216
216
|
hash[:_id] = attrs[:id]
|
217
217
|
hash[:entity_version] = attrs[:entity_version]
|
218
|
+
hash[:entity_id] = attrs[:_entity_id]
|
218
219
|
EntityStore::Config.load_type(attrs[:_type]).new(hash)
|
219
220
|
rescue => e
|
220
221
|
log_error "Error loading type #{attrs[:_type]}", e
|
@@ -225,5 +226,13 @@ module EntityStoreSequel
|
|
225
226
|
|
226
227
|
result
|
227
228
|
end
|
229
|
+
|
230
|
+
private
|
231
|
+
|
232
|
+
def hash_without_keys(hash, *keys)
|
233
|
+
hash_dup = hash.dup
|
234
|
+
keys.each { |key| hash_dup.delete(key) }
|
235
|
+
hash_dup
|
236
|
+
end
|
228
237
|
end
|
229
238
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: entity_store_sequel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stephen Binns
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|