1
0
Fork 0

Fixed dumping of keygen. It was created too late.

This commit is contained in:
Michael Hackstein 2016-09-27 10:44:24 +02:00
parent 40dbed7a19
commit b97005cca3
1 changed files with 44 additions and 47 deletions

View File

@ -492,7 +492,8 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
}
}
if (info.isObject()) {
_keyGenerator.reset(KeyGenerator::factory(info.get("keyOptions")));
auto shardsSlice = info.get("shards");
if (shardsSlice.isObject()) {
for (auto const& shardSlice : VPackObjectIterator(shardsSlice)) {
@ -511,8 +512,8 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
auto indexesSlice = info.get("indexes");
if (indexesSlice.isArray()) {
for (auto const& v : VPackArrayIterator(indexesSlice)) {
if (arangodb::basics::VelocyPackHelper::getBooleanValue(
v, "error", false)) {
if (arangodb::basics::VelocyPackHelper::getBooleanValue(v, "error",
false)) {
// We have an error here.
// Do not add index.
// TODO Handle Properly
@ -541,10 +542,6 @@ LogicalCollection::LogicalCollection(TRI_vocbase_t* vocbase,
_path = engine->createCollection(_vocbase, _cid, this);
}
}
}
_keyGenerator.reset(KeyGenerator::factory(info.get("keyOptions")));
createPhysical();