use of org.springframework.data.annotation.Id in project spring-data-mongodb by spring-projects.
the class ReactiveMongoTemplateTests method nullsValuesForUpdatesOfUnversionedEntity.
// DATAMONGO-1444
@Test
public void nullsValuesForUpdatesOfUnversionedEntity() {
Person person = new Person("Dave");
StepVerifier.create(template.save(person)).expectNextCount(1).verifyComplete();
person.setFirstName(null);
StepVerifier.create(template.save(person)).expectNextCount(1).verifyComplete();
//
StepVerifier.create(template.findOne(query(where("id").is(person.getId())), Person.class)).consumeNextWith(actual -> {
assertThat(actual.getFirstName(), is(nullValue()));
}).verifyComplete();
}
Aggregations