mongotemplate Questions
3
I am new to Spring Boot and MongoDb.
Trying some examples with Mongo Repositories and Spring Boot.
But after going through some of the documents found that Mongo Template is will be a better opti...
Typhus asked 10/7, 2016 at 3:18
13
Solved
Here is a simple pojo:
public class Description {
private String code;
private String name;
private String norwegian;
private String english;
}
And please see the following code to apply an ...
Cusack asked 15/11, 2013 at 12:55
3
Solved
I need to pull a subdocument in MongoTemplate but cannot figure out how to do it.
My saved document is:
{
"_id" : "FooUser",
"_class" : "com.domain.User",
"tests" : [
{
"variant" : {
"_id"...
Haskins asked 26/11, 2014 at 15:26
5
Bulk updates are supported from spring-data-mongodb from 1.9.0.RELEASE.
BulkOperations ops = template.bulkOps(BulkMode.UNORDERED, Match.class);
for (User user : users) {
Update update = new Upda...
Disfranchise asked 17/11, 2016 at 3:48
3
com.mongodb.CommandFailureException: { "serverUsed" : "localhost:27017" , "createdCollectionAutomatically" : true , "numIndexesBefore" : 1 , "ok" : 0.0 , "errmsg" : "namespace name generated from i...
Willetta asked 10/2, 2015 at 20:22
5
I Have a list of updated objects/documents i need save all the objects in the list at once.
I saw save() in MongoTemplate but it can take single document at a time.
Is there any way to save multi...
Cagliostro asked 6/6, 2018 at 11:7
3
Solved
I am trying to connect mongoDb with Spring's mongoTemplate. I also tried changing version of 'spring-data-mongodb' from 1.7.2.RELEASE to 1.8.2.RELEASE, but even that didn't work.
Below is my code ...
Latricelatricia asked 18/10, 2016 at 4:58
2
aggregate method of MongoTemplate returns AggregationResults<T>, where T being the class that corresponds to mongo collection.
Sometimes, we only want the single (say property abc) or a coup...
Trimeter asked 6/7, 2017 at 13:2
1
I need to write a Query which can find objects in DB whose child array size is greater than something.
My Object looks like:
{
"_id" : ObjectId("sbg8732god78"),
"studentIds" : [ "d3782gdo", "d8...
Concinnate asked 12/11, 2017 at 12:20
2
Solved
I'm trying to create an aggregate query using mongotemplate where there's a grouping by date (i.e 2016-03-01) instead of datetime (i.e 2016-03-01 16:40:12).
The dateToString operation exists in th...
Murrah asked 3/1, 2016 at 14:57
2
Solved
I'm generating a complicated Mongo query depending on multiple parameters. One of criterion that I want to make with Criteria helper class is:
{"field1": {$exists: true, $ne: false}}
I tried to ...
Haifa asked 5/11, 2015 at 14:3
1
I want to upload files and retrieve them from mongodb in spring boot application. But I don't want to use GridFSTemplate because my file size will not be greater than 16 MB. I am not choosing GridF...
Boles asked 20/11, 2017 at 10:3
3
Solved
how we can create Indexes for the following query using MongoTemplate? I am referring to site http://docs.mongodb.org/v2.4/tutorial/search-for-text/ they've not given any details about how we can c...
Encarnalize asked 14/10, 2015 at 14:22
2
currently i am using mongoDB in spring as mongoTemplate .
public List<BasicDBObject> getMoviesByName() {
Aggregation aggregation = newAggregation(unwind("movies"),
match(where("movies.lan...
Ectoblast asked 18/11, 2016 at 14:26
1
Solved
I have a document as shown below
{
"_id" : ObjectId("5864ddd8e38112fd70b89893"),
"_class" : "com.apic.models.UserReg",
"name" : "xxx",
"email" : "[email protected]"
"activationToken" : "...
Hoptoad asked 1/1, 2017 at 17:57
1
Solved
I would like to query the objects in my collection such as a given value must belong to the values in the stringArray
stringArray is the name of the field for each Obejct that contains a list of S...
Laager asked 21/1, 2014 at 14:47
1
© 2022 - 2024 — McMap. All rights reserved.