You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/04/14 17:24:28 UTC

[GitHub] [nifi] ravinarayansingh commented on a diff in pull request #5966: NIFI-9899 Bug Fix for MongoDBLookupService to read database and collection name properties value from flowfile attribute

ravinarayansingh commented on code in PR #5966:
URL: https://github.com/apache/nifi/pull/5966#discussion_r850654027


##########
nifi-nar-bundles/nifi-mongodb-bundle/nifi-mongodb-services/src/main/java/org/apache/nifi/mongodb/MongoDBLookupService.java:
##########
@@ -223,7 +223,9 @@ protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
         return Collections.unmodifiableList(_temp);
     }
 
-    private Document findOne(Document query, Document projection) {
+    private Document findOne(Document query, Document projection,Map<String, String> context) {
+        final String databaseName = getProperty(DATABASE_NAME).evaluateAttributeExpressions(context).getValue();
+        final String collection = getProperty(COLLECTION_NAME).evaluateAttributeExpressions(context).getValue();

Review Comment:
   So you are saying  instead of creating new variable i should assign the value to this.database and this.collection ?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org