apache / incubator-kie-kogito-apps

Kogito Apps - Kogito is a cloud-native business automation technology for building cloud-ready business applications.
http://kogito.kie.org
Apache License 2.0
60 stars 129 forks source link

AND condition is not working within Objects/List of Objects in DI query #1614

Open prerana15 opened 1 year ago

prerana15 commented 1 year ago

My requirement is - I have a process which contains an Array. I want to filter the process based on $elemMatch (used in Mongo Db) in an array. Is there a way I can query Array in DI. If I use containsAny or Contains - the DI query is giving random results (not exact match).

Sample Query: query Comments(where: {commentary: {commentList: commentCategoryCode:{equal:"RESOLVE_NOTES"}, commentText:{like:"comment"}}}{

commentary { commentList{ commentCategoryCode commentText } }

}

Expected Result: get all the commentary objects where commentCategoryCode is RESOLVE_NOTES and commentText is like "comments"

Actual Result: getting results even if commentText is matching in commentCategoryCode = "NOTES"

Note: We have 2 commentCategoryCode - RESOLVE_NOTES and NOTES

debu999 commented 1 year ago

cc @nmirasch

prerana15 commented 1 year ago

@nmirasch @cristianonicolai - Could you please help here?

nmirasch commented 1 year ago

@debu999 @prerana15 Could you please create a jira with all the details, to track the enhances you see, specially with DI , that would improve to follow the needs and to have them into account when defining development priorities, Thanks!

prerana15 commented 1 year ago

@nmirasch - Please refer to jira: https://issues.redhat.com/browse/KOGITO-8594

prerana15 commented 1 year ago

@nmirasch - did anyone get chance to look into this?

debu999 commented 1 year ago

Hi All, Is there any update on this. It been there for almost 6 months now. We only need for mongodb $elemMatch if the object is list during query. Can this be prioritized?