spring-mongodb Questions

1

Solved

I am trying using mongoDB in spring. When I was trying to query the users with the function findUserByUserNamelike this: @Repository("usersDao") public class UserDaoImpl implements UserDao { @Au...
Libbylibeccio asked 25/5, 2018 at 3:5

3

I'm using spring mongo template to run an agreegation query on mongodb. I'm wondering is there any way to find out the count of aggregation result in spring mongo template? Here is my Aggregation ...
Supplicant asked 25/9, 2015 at 15:0

5

I recently bumped up my spring boot version to 1.4.0. Now I see the following warnings below. I am using spring-mongodb and spring-redis (strictly for caching). Is this something I should be concer...
Stalder asked 11/9, 2016 at 4:10

1

Can someone tell me how do I configure spring data mongoDB in such a way that it does not create a new collection(if it does not exist) but throws an exception while inserting a document?
Haemolysin asked 25/10, 2017 at 4:45

3

I have a problem with the "time to live" settings in MongoDB. I created an Indexed Annotation in my Spring-Boot 2.0.2.RELEASE project in my Entity which represents my Document in the MongoDB. I set...
Haymaker asked 25/5, 2018 at 16:8

2

Solved

{ _id: 1, results: [ "tokyo", "japan" ] } { _id: 2, results: [ "sydney", "australia" ] } db.scores.find( { results: { $elemMatch: { $regex: *some regex* } } } ) How do you convert this simpl...
Baddie asked 11/9, 2018 at 1:45

2

Solved

I'm using the Spring Mongo driver to execute a large mongo aggregation statement that will run for a period of time. The output stage of this aggregation writes the output of the aggregation into a...
Downall asked 25/2, 2020 at 19:55

4

I want to set the WriteConcern in spring mongodb to acknowledged. Also, I'm wondering if this is the default value? I am using the spring.data.mongodb.uri in my application.properties so I don't ha...
Osculation asked 8/9, 2016 at 12:10

0

I have this json in my Mongo collection(as field of main object): "dateOfBirth" : { "year" : 1953, "month" : 4, "day" : 26 } And I have this Java class ...
Catharinecatharsis asked 30/10, 2020 at 16:28

2

Solved

I've provided a sample project to elucidate this problem: https://github.com/nmarquesantos/spring-mongodb-reactive-indexes According to the spring mongo db documentation (https://docs.spring.io/sp...
Knavish asked 5/6, 2020 at 5:25

2

How to update a particular field in mongo db collection by using MongoRepository Interface in spring?
Sherrod asked 16/8, 2016 at 11:3

1

I am currently working on a spring boot application 2.0.3.RELEASE. I want to configure Flapdoodle MongoDb with MongoDb version 4.0 and I also want to set a single mongo instance and create replicas...
Belden asked 24/7, 2018 at 13:10

1

{ "Field1": "ABC", "Field2": [ { "Field3": "ABC1","Field4": "REVIEWED","Field5":"True" }, { "Field3": "ABC2","Field4": "APPROVED","Field5":"True" }, { "Field3": "ABC3","Field4": "REJECTED","...
Darien asked 30/12, 2019 at 17:35

3

Solved

I am having trouble writing code that would allow get a user and claim details in a straightforward way. This is my MongoDB structure, db.user.find(); user: { "name" : "KSK"...
Kaleighkalends asked 30/5, 2017 at 10:21

2

Solved

My MongoDB json structure is { "_id" : "122134231234234", "name" : "Total_pop", "description" : "sales category", "source" : "public", "dataset" :"d1" }, { "_id" : "1123421231234234", "n...
Kunkel asked 26/7, 2015 at 9:57

1

Solved

Firstly, the document schema am querying on, is as follows: {x:10, y:"temp", z:20} There are multiple other documents in the collection with the same schema as above. Now, I have a list where...
Ariel asked 1/3, 2019 at 8:47

0

I have a model like the one below (assume as pseudo code ) class Student { @Id private String id; private String firstname; .....; @DBRef(lazy=true) private College college // getters a...
Salamander asked 21/9, 2018 at 6:39

2

I use spring mongo data rest and querydsl the domain: has a property: @DateTimeFormat(iso = ISO.DATE_TIME) private LocalDateTime registerTime; To use Json ,I add : jackson-datatype-jsr3...
Gorki asked 28/10, 2016 at 4:45

1

I have the following configuration Configuration @Configuration @EnableMongoRepositories(basePackages = Constants.DATA_SCAN) @EnableMongoAuditing(auditorAwareRef = "auditorAwareService") @Import(...

1

Solved

When serializing from Java to JSON, Jackson generates an extra target property for referenced entities when using the Spring Data MongoDB @DBRef annotation with lazy loading and Jackson’s polymorph...
Ethban asked 13/2, 2018 at 10:18

1

Solved

I'm running into something odd with inheritance and mongodbrepositories. I have the following: ` @Document public class Base { public String fieldA; } public class Derived extends Base { ...
Thoma asked 7/2, 2018 at 21:46

2

Solved

I have a situation where I have got one result from aggregation where I am getting data in this format. { "_id" : ObjectId("5a42432d69cbfed9a410e8ad"), "bacId" : "BAC0023444", "cardId" : "2", ...
Tevere asked 27/12, 2017 at 10:34

3

Solved

I have a function that receive an Aggregation aggregation as a param. I would like to get all AggregationOperation from aggregation. Is there any way to do it? public Aggregation newCustomAggrega...
Olein asked 9/11, 2017 at 12:56

1

Solved

I am doing MongoDB aggregation. I want to lookup two collections then project only desired field in nested array. Two collections to lookup: db.pitcher.find().pretty() { "_id" : ObjectId("59...
Nurse asked 8/9, 2017 at 8:19

2

Solved

I have the model like following @CompoundIndexes(value = { @CompoundIndex(name = "catalog_idx", def = "{'code' : 1, 'brand' : 1}", unique = true) }) @Document(collection = Catalog.ENTITY) public ...
Atrocious asked 7/8, 2017 at 8:33

© 2022 - 2024 — McMap. All rights reserved.