In my Java Play framework application, I want to store the ArrayList values in mongoDB.
Spring Project
{
"_id" : ObjectId("5832f29bd4c6721e4e8ba4a7"),
"_class" : "[login to view URL]",
"title" : "fsaf",
"desc" : "adgg",
"keyWords" : "dgds",
"createdDate" : ISODate("2016-11-21T13:11:55.823Z"),
"checkbox1" : false,
"checkbox2" : false,
"checkbox3" : false,
"scopeOfIdea" : "Herkes",
"template" : false,
"creatorUser" : {
"$ref" : "user",
"$id" : ObjectId("5832f27dd4c6721e4e8ba4a5")
},
"owners" : [
{
"$ref" : "user",
"$id" : ObjectId("5832f27dd4c6721e4e8ba4a5")
}
],
"answer" : {
"$ref" : "answer",
"$id" : ObjectId("5832f29bd4c6721e4e8ba4a6")
},
"fileList" : []
}
I want to search in owners but my current query doesn't work:
if(owners != null && ![login to view URL]()) {
for(int i=0; i<[login to view URL](); i++) {
[login to view URL](new **Criteria().elemMatch([login to view URL]("owners.$id").is([login to view URL](i).getId())));**
}
}
How can I fix? I can search by owners and owners can be two or three people.
Sample Output
[login to view URL]
This is an example with output... title desc vs vsdate and owners
Hi I have been in this industry for 10 years and such jobs are my daily practice.I can assure you that if you work with me once, you will always work with me for these kind of projects.