DATAMONGO-1094 - Fixed ambiguous field mapping error message in BasicMongoPersistentEntity.

Original pull request: #245.
This commit is contained in:
Thomas Darimont
2014-11-14 16:49:45 +01:00
parent 1fdde8f0c3
commit f183b5c7e6
2 changed files with 2 additions and 1 deletions

View File

@@ -53,7 +53,7 @@ import org.springframework.util.StringUtils;
public class BasicMongoPersistentEntity<T> extends BasicPersistentEntity<T, MongoPersistentProperty> implements
MongoPersistentEntity<T>, ApplicationContextAware {
private static final String AMBIGUOUS_FIELD_MAPPING = "Ambiguous field mapping detected! Both %s and %s map to the same field name %s! Disambiguate using @DocumentField annotation!";
private static final String AMBIGUOUS_FIELD_MAPPING = "Ambiguous field mapping detected! Both %s and %s map to the same field name %s! Disambiguate using @Field annotation!";
private final String collection;
private final String language;
private final SpelExpressionParser parser;

View File

@@ -106,6 +106,7 @@ public class MongoMappingContextUnitTests {
exception.expectMessage("firstname");
exception.expectMessage("lastname");
exception.expectMessage("foo");
exception.expectMessage("@Field");
MongoMappingContext context = new MongoMappingContext();
context.setApplicationContext(applicationContext);