Permalink
Browse files

updated MongodDB examples to build against spring-data-document 1.0.0.M2

  • Loading branch information...
1 parent a69469c commit b13776d37475b19543bd9fb2398c861122816d00 @trisberg trisberg committed Apr 22, 2011
@@ -11,9 +11,9 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.0.5.RELEASE</spring.version>
- <spring.data.mongo.version>1.0.0.BUILD-SNAPSHOT</spring.data.mongo.version>
- <spring.data.jpa.version>1.0.0.BUILD-SNAPSHOT</spring.data.jpa.version>
- <aspectj.version>1.6.11.RELEASE</aspectj.version>
+ <spring.data.mongo.version>1.0.0.M2</spring.data.mongo.version>
+ <spring.data.jpa.version>1.0.0.BUILD-SNAPSHOT</spring.data.jpa.version>
+ <aspectj.version>1.6.11.RELEASE</aspectj.version>
<slf4j.version>1.6.1</slf4j.version>
</properties>
View
@@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.0.5.RELEASE</spring.version>
- <spring.data.mongo.version>1.0.0.M1</spring.data.mongo.version>
+ <spring.data.mongo.version>1.0.0.M2</spring.data.mongo.version>
<slf4j.version>1.6.1</slf4j.version>
</properties>
@@ -99,10 +99,10 @@ 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)),
+ new Query(where("age").lt(50).and("accounts.balance").gt(1000.00d)),
Person.class);
System.out.println(result);
@@ -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)),
View
@@ -12,7 +12,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<spring.version>3.0.5.RELEASE</spring.version>
- <spring.data.mongo.version>1.0.0.BUILD-SNAPSHOT</spring.data.mongo.version>
+ <spring.data.mongo.version>1.0.0.M2</spring.data.mongo.version>
<slf4j.version>1.6.1</slf4j.version>
</properties>
@@ -8,11 +8,11 @@
<name>myrestaurants-analytics</name>
<properties>
<spring.version>3.0.5.RELEASE</spring.version>
- <spring.data.mongo.version>1.0.0.M1</spring.data.mongo.version>
- <aspectj.version>1.6.10.RELEASE</aspectj.version>
+ <spring.data.mongo.version>1.0.0.M2</spring.data.mongo.version>
+ <aspectj.version>1.6.11.RELEASE</aspectj.version>
<slf4j.version>1.6.1</slf4j.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <spring-security.version>3.0.2.RELEASE</spring-security.version>
+ <spring-security.version>3.0.2.RELEASE</spring-security.version>
</properties>
<repositories>
<repository>

0 comments on commit b13776d

Please sign in to comment.