Fully consume insert response.
R2dbcEntityTemplate.insert(…) now fully consumes the response from the INSERT call before continuing. Previously, we consumed only the first signal and continued then. A driver could emit a row and then an error signal and so the error signal would go unnoticed. Closes #552.
This commit is contained in:
@@ -392,8 +392,7 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
.into(persistentEntity.getType()) //
|
||||
.table(tableName).using(entityToInsert) //
|
||||
.map(this.dataAccessStrategy.getConverter().populateIdIfNecessary(entityToInsert)) //
|
||||
.first() //
|
||||
.defaultIfEmpty(entityToInsert);
|
||||
.all().last(entityToInsert); //
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
Reference in New Issue
Block a user