Jako já jsem pracoval na Projektu, kde chci přepsat Uni Multi pro metodu "findall", aby si všechny mongodb Dokumentu z kolekce. Snažil jsem se to přepsat, ale není schopen najít řešení
originál:
public Uni<List<Book>> findAll(List<String> authors)
{
return getCollection().
find(Filters.all("authors",authors)).map(Book::from).collectItems().asList();
}
Co jsem zkoušel (Ale ne pracovat)
public Multi<Book> findAll(List<String> authors)
{
return getCollection().find(Filters.all("authors",authors)).transform().
byFilteringItemsWith(Objects::nonNull).onCompletion().ifEmpty().
failWith(new NoSuchElementException("couldn't find the Authors")).onItem().transform(Book::from);
}