Skip to content
Closed
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
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
<packaging>pom</packaging>

<name>Spring Data MongoDB</name>
Expand All @@ -29,7 +29,7 @@
<properties>
<project.type>multi</project.type>
<dist.id>spring-data-mongodb</dist.id>
<springdata.commons>1.9.0.BUILD-SNAPSHOT</springdata.commons>
<springdata.commons>1.9.0.DATACMNS-534-SNAPSHOT</springdata.commons>
<mongo>2.12.1</mongo>
<mongo.osgi>2.12.1</mongo.osgi>
</properties>
Expand Down
4 changes: 2 additions & 2 deletions spring-data-mongodb-cross-store/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -48,7 +48,7 @@
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb-distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb-log4j/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion spring-data-mongodb/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-mongodb-parent</artifactId>
<version>1.6.0.BUILD-SNAPSHOT</version>
<version>1.6.0.DATAMONGO-980-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,7 @@ protected void writeInternal(Object obj, final DBObject dbo, MongoPersistentEnti
entity.doWithProperties(new PropertyHandler<MongoPersistentProperty>() {
public void doWithPersistentProperty(MongoPersistentProperty prop) {

if (prop.equals(idProperty) || prop.isCalculatedProperty()) {
if (prop.equals(idProperty) || !prop.shallBePersisted()) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,4 @@ public boolean isLanguageProperty() {
public boolean isTextScoreProperty() {
return isAnnotationPresent(TextScore.class);
}

/*
* (non-Javadoc)
* @see org.springframework.data.mongodb.core.mapping.MongoPersistentProperty#isCalculatedProperty()
*/
@Override
public boolean isCalculatedProperty() {
return isAnnotationPresent(Calculated.class);
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ public interface MongoPersistentProperty extends PersistentProperty<MongoPersist
*/
boolean isTextScoreProperty();

/**
* Returns wheter the property is calculated eiter internally or on the server and therefore must not be written when
* saved.
*
* @return
* @since 1.6
*/
boolean isCalculatedProperty();

/**
* Returns the {@link DBRef} if the property is a reference.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.data.annotation.ReadOnlyProperty;

/**
* {@link TextScore} marks the property to be considered as the on server calculated {@literal textScore} when doing
* full text search. <br />
Expand All @@ -29,7 +31,7 @@
* @author Christoph Strobl
* @since 1.6
*/
@Calculated
@ReadOnlyProperty
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ public void shouldDetectTextScoreAsCalculatedProperty() {
ClassTypeInformation.from(DocumentWithTextScoreProperty.class));

MongoPersistentProperty property = getPropertyFor(persistentEntity, "score");
assertThat(property.isCalculatedProperty(), is(true));
assertThat(property.isReadOnly(), is(true));
}

private MongoPersistentProperty getPropertyFor(Field field) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,4 +214,10 @@ public MongoPersistentEntityTestDummy<T> build() {
public String getLanguage() {
return null;
}

@Override
public void doWithWritingProperties(PropertyHandler<MongoPersistentProperty> handler) {
doWithProperties(handler);
}

}