Skip to content
This repository was archived by the owner on Apr 5, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public void queryingForDocuments() {
p4.addAccount(new Account("719-100-0019", Account.Type.SAVINGS, 1209.10d));
mongoTemplate.insert(p4);

assertEquals(4, mongoTemplate.getCollection("HelloMongo").count());
assertEquals(4, mongoTemplate.getCollection("MyCollection").count());

List<Person> result = mongoTemplate.find(
new Query(where("age").lt(50)).and(where("accounts.balance").gt(1000.00d)),
Expand All @@ -126,7 +126,7 @@ public void updatingDocuments() {
p4.addAccount(new Account("719-100-0019", Account.Type.SAVINGS, 1209.10d));
mongoTemplate.insert(p4);

assertEquals(4, mongoTemplate.getCollection("HelloMongo").count());
assertEquals(4, mongoTemplate.getCollection("MyCollection").count());

WriteResult wr = mongoTemplate.updateMulti(
new Query(where("accounts.accountType").not().is(Account.Type.SAVINGS)),
Expand Down
8 changes: 7 additions & 1 deletion mongodb-music/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<artifactId>spring-data-mongodb-examples-music</artifactId>
<version>0.0.1-SNAPSHOT</version>

<name>spring-data-mongodb-examples-hello</name>
<name>spring-data-mongodb-examples-music</name>
<url>http://maven.apache.org</url>

<properties>
Expand All @@ -27,6 +27,12 @@
<name>Spring Maven Milestone Repository</name>
<url>http://maven.springframework.org/milestone</url>
</repository>
<repository>
<id>spring-maven-snapshot</id>
<name>Springframework Maven SNAPSHOT Repository</name>
<snapshots><enabled>true</enabled></snapshots>
<url>http://maven.springframework.org/snapshot</url>
</repository>
<repository>
<id>querydsl</id>
<name>Mysema QueryDsl</name>
Expand Down