|
|
|
@ -1,5 +1,5 @@ |
|
|
|
/* |
|
|
|
/* |
|
|
|
* Copyright 2013-2021 the original author or authors. |
|
|
|
* Copyright 2013-2022 the original author or authors. |
|
|
|
* |
|
|
|
* |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
@ -1258,7 +1258,7 @@ class UpdateMapperUnitTests { |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(mappedUpdate).isEqualTo(new org.bson.Document("$set",new org.bson.Document("testInnerData.testMap.1.intValue","4"))); |
|
|
|
assertThat(mappedUpdate).isEqualTo("{ $set: { 'testInnerData.testMap.1.intValue': '4' }}"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test // GH-3921
|
|
|
|
@Test // GH-3921
|
|
|
|
@ -1268,7 +1268,7 @@ class UpdateMapperUnitTests { |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(mappedUpdate).isEqualTo(new org.bson.Document("$set",new org.bson.Document("testInnerData.imaginaryMap.1.noExistingProperty","4"))); |
|
|
|
assertThat(mappedUpdate).isEqualTo("{ $set: { 'testInnerData.imaginaryMap.1.nonExistingProperty': '4' }}"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test // GH-3921
|
|
|
|
@Test // GH-3921
|
|
|
|
@ -1278,7 +1278,7 @@ class UpdateMapperUnitTests { |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
Document mappedUpdate = mapper.getMappedObject(update.getUpdateObject(), |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
context.getPersistentEntity(TestData.class)); |
|
|
|
|
|
|
|
|
|
|
|
assertThat(mappedUpdate).isEqualTo(new org.bson.Document("$set",new org.bson.Document("testInnerData.testMap.1.nonExistingProperty.2.someValue","4"))); |
|
|
|
assertThat(mappedUpdate).isEqualTo("{ $set: { 'testInnerData.testMap.1.nonExistingProperty.2.someValue': '4' }}"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static class DomainTypeWrappingConcreteyTypeHavingListOfInterfaceTypeAttributes { |
|
|
|
static class DomainTypeWrappingConcreteyTypeHavingListOfInterfaceTypeAttributes { |
|
|
|
@ -1653,8 +1653,7 @@ class UpdateMapperUnitTests { |
|
|
|
|
|
|
|
|
|
|
|
@Data |
|
|
|
@Data |
|
|
|
private static class TestData { |
|
|
|
private static class TestData { |
|
|
|
@Id |
|
|
|
@Id private String id; |
|
|
|
private String id; |
|
|
|
|
|
|
|
private TestInnerData testInnerData; |
|
|
|
private TestInnerData testInnerData; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|