i my application when user try to signup the data he enter from form is saved into two different document
public Result schoolSignUp(FormSchoolSignUp signUpForm){
User userEntered=null;
if(signUpForm.getEmail()!=null){
User…
I am trying to convert MongoDB Aggregation function to Java Aggregation function.
My MongoDB Query is
[
{
"$match": {
"indicesId": "VUSSTAPNETFF"
}
},
{
"$unwind": "$dataSets"
},
{
"$match": {
"dataSets.date": {
…
I'm creating a Spring Boot application and I am using AngularJS on the frontend.
Upon submitting a form with the appropiate parameters, Spring is supposed to use bookRepository.save() method in order to save the provided data in the MongoDB. The…
I have the following document (@Document):
@Id
private String id;
private String fileName;
private String projectId;
private List documentFileVersions;
private List userIdBlackList; // here userIds are included
and…
I have a MongoDB storing data from different sensors. It has the following structure:
{
"_id" : 1,
"sensorName" : "Heart Rate",
"samplePeriod" : 1000,
"data" : [
{
"timestamp" :…
I have written custom serializer and deserializer for com.google.common.collect.Table class. But it is not getting called while persisting that object in MongoDB. I am using Spring 4, Spring-MongoDB 1.9 and Jackson 2.8.4. Below are the class and…
I have following Spring MongoDB repository class. When I am trying to access this method I am getting following exception. Could you please let me know what's wrong with this one or how to populate Table from JSON? I am using Java 8, Spring 4 and…
I am iterating over a list of objects and saving one object at a time after each loop. What i found is that only the last object is always saved when using the MongoRepository interface.
for instance
for(int i=0;i<=objectList.size();i++){
…
This is my pojo structure which is having a Map as an instance variable
@Document(collection = "notifications")
public class PushNotification {
private String notificationId;
private String title;
private String message;
private PushType…
I use mongo custom tokenStore and codeService:
this is my custom mongoTokenStore:
public class MongoTokenStore implements TokenStore {
private final MongoAccessTokenRepository mongoAccessTokenRepository;
private final…
I have a collection with documents of the following structure:
{
"category": "movies",
"movies": [
{
"name": "HarryPotter",
"language": "english"
},
{
"name": "Fana",
…
I need to fetch records from a MongoDB which has a set of documents. I am using Spring Boot and MongoRepository to do the CRUD operations. I am using a Query annotation to pass my Mongo query.But Spring is unable to parse the query that I have…
I just cannot create a desired index. I list existing indexes with
System.out.println(mongo.getCollection("User").getIndexInfo());
and still get only
[{ "v" : 1 , "key" : { "_id" : 1} , "name" : "_id_1" , "ns" : "devtest01.User"}]
I…
I am trying to cache using spring's @Cacheable. I'm also using spring mongodb. I keep getting the following error:
java.lang.IllegalArgumentException: Null key returned for cache operation (maybe you are using named params on classes without debug…