Merge pull request #197 from bmuppana/master
Fixing object copy issue with lambdas in KeyBackedTypes.h
This commit is contained in:
commit
0d4db774b2
|
@ -135,20 +135,22 @@ public:
|
|||
}
|
||||
|
||||
Future<Optional<T>> get(Database cx, bool snapshot = false) const {
|
||||
auto © = *this;
|
||||
return runRYWTransaction(cx, [=](Reference<ReadYourWritesTransaction> tr) {
|
||||
tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
||||
return get(tr, snapshot);
|
||||
return copy.get(tr, snapshot);
|
||||
});
|
||||
}
|
||||
|
||||
Future<T> getOrThrow(Database cx, bool snapshot = false, Error err = key_not_found()) const {
|
||||
auto © = *this;
|
||||
return runRYWTransaction(cx, [=](Reference<ReadYourWritesTransaction> tr) {
|
||||
tr->setOption(FDBTransactionOptions::ACCESS_SYSTEM_KEYS);
|
||||
tr->setOption(FDBTransactionOptions::LOCK_AWARE);
|
||||
|
||||
return getOrThrow(tr, snapshot, err);
|
||||
return copy.getOrThrow(tr, snapshot, err);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue