Advertisement
Guest User

Untitled

a guest
Jul 16th, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. class Person {
  2. List<Address> addresses;
  3. }
  4.  
  5. public interface PersonRepository extends ReactiveMongoRepository<Person, String>{
  6. }
  7.  
  8. Flux<Addresses> getAddressesByPersonId(String personId)
  9.  
  10. public Flux<Addresses> getAddressesByPersonId(String personId){
  11. Mono<Person> person = personRepository.findById(personId);
  12. return person.map(e -> e.getAdresses()).flux()
  13. }
  14.  
  15. Type mismatch: cannot convert from Flux<List<Person>> to Flux<Person>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement