I've read through the tutorials, but I still can't find the answer to these questions.
1) What is the advantage of using repositories vs. using MongoOperations? Why would I use it?
2) It seems that all objects that would be stored in the database needs to have a toString() method. I assume that that's because this is the method that's used to generate the BSON to be passed to mongo. However, the example in the documentation does not look like a BSON document, but more like an array. What class converts that string that is returned into the BSON to be sent to mongo? Also, how would I repesent an array since the [] brackets are alreading being used? Do I just add a second pair of []? For refernce, here is the example in the documentation:
@Override
public String toString() {
return "Person [id=" + id + ", name=" + name + ", age=" + age + "]";
}
3) Is there any place where I can get documentation on the actual inner workings of Spring Data - MongoDB?
Thanks in advance.
1) What is the advantage of using repositories vs. using MongoOperations? Why would I use it?
2) It seems that all objects that would be stored in the database needs to have a toString() method. I assume that that's because this is the method that's used to generate the BSON to be passed to mongo. However, the example in the documentation does not look like a BSON document, but more like an array. What class converts that string that is returned into the BSON to be sent to mongo? Also, how would I repesent an array since the [] brackets are alreading being used? Do I just add a second pair of []? For refernce, here is the example in the documentation:
@Override
public String toString() {
return "Person [id=" + id + ", name=" + name + ", age=" + age + "]";
}
3) Is there any place where I can get documentation on the actual inner workings of Spring Data - MongoDB?
Thanks in advance.