In ReactiveCrudRepository we have saveAll methods
<S extends T> reactor.core.publisher.Flux<S> saveAll(org.reactivestreams.Publisher<S> entityStream)
<S extends T> reactor.core.publisher.Flux<S> saveAll(Iterable<S> entities)
When we save collection with N elements, N queries are made not one. For example if we save collection with 2 elements, we get 2 queries like :
INSERT INTO test(id, value) VALUES (111, "value1");
INSERT INTO test(id, value) VALUES (222, "value2");
Is there a way to make this in one SQL query?
INSERT INTO test(id, value) VALUES (111, "value1"), (222, "value2");
It may be needed to map to Mono, but this is ok for me in this case.