I am new to mongo DB with spring integration.
Basically I have created a MongoTemplate and injected that to my DAO layer for DB operations. However when I doing some insert operation, in case of duplicate documents its not throwing any exception/error but it's not even inserting the document as well.
1) Could you please help how to get a exception in case of duplicate document entry.
mongoTemplate.insert(person, "Person");
2) What is the difference between MongoOperations and mongotemplate
댓글 없음:
댓글 쓰기