Retain element ordering in entity callbacks.
We now use concatMap on result Fluxes to retain the object order. Previously, we used flatMap on a flux that has led to changes in element ordering. Closes #777
This commit is contained in:
@@ -409,7 +409,7 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
return (P) ((Mono<?>) result).flatMap(it -> maybeCallAfterConvert(it, tableName));
|
||||
}
|
||||
|
||||
return (P) ((Flux<?>) result).flatMap(it -> maybeCallAfterConvert(it, tableName));
|
||||
return (P) ((Flux<?>) result).concatMap(it -> maybeCallAfterConvert(it, tableName));
|
||||
}
|
||||
|
||||
private <T> RowsFetchSpec<T> doSelect(Query query, Class<?> entityClass, SqlIdentifier tableName,
|
||||
@@ -1114,7 +1114,7 @@ public class R2dbcEntityTemplate implements R2dbcEntityOperations, BeanFactoryAw
|
||||
|
||||
@Override
|
||||
public Flux<T> all() {
|
||||
return delegate.all().flatMap(it -> maybeCallAfterConvert(it, tableName));
|
||||
return delegate.all().concatMap(it -> maybeCallAfterConvert(it, tableName));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user