mirror of
https://github.com/pocoproject/poco.git
synced 2025-11-03 19:40:37 +01:00
Merge pull request #429 from fbraem/develop
Solve collection name problem in ensureIndex
This commit is contained in:
@@ -72,7 +72,7 @@ double Database::count(Connection& connection, const std::string& collectionName
|
|||||||
Poco::MongoDB::Document::Ptr Database::ensureIndex(Connection& connection, const std::string& collection, const std::string& indexName, Poco::MongoDB::Document::Ptr keys, bool unique, bool background, int version, int ttl)
|
Poco::MongoDB::Document::Ptr Database::ensureIndex(Connection& connection, const std::string& collection, const std::string& indexName, Poco::MongoDB::Document::Ptr keys, bool unique, bool background, int version, int ttl)
|
||||||
{
|
{
|
||||||
Poco::MongoDB::Document::Ptr index = new Poco::MongoDB::Document();
|
Poco::MongoDB::Document::Ptr index = new Poco::MongoDB::Document();
|
||||||
index->add("ns", _dbname + ".players");
|
index->add("ns", _dbname + "." + collection);
|
||||||
index->add("name", indexName);
|
index->add("name", indexName);
|
||||||
index->add("key", keys);
|
index->add("key", keys);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user