org.springframework.data.mongodb.repository

Interface ReactiveMongoRepository<T,ID>

    • Method Detail

      • insert

        <S extends T> reactor.core.publisher.Mono<S> insert(S entity)
        Inserts the given entity. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
        Parameters:
        entity - must not be null.
        Returns:
        the saved entity
      • insert

        <S extends T> reactor.core.publisher.Flux<S> insert(Iterable<S> entities)
        Inserts the given entities. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
        Parameters:
        entities - must not be null.
        Returns:
        the saved entity
      • insert

        <S extends T> reactor.core.publisher.Flux<S> insert(org.reactivestreams.Publisher<S> entities)
        Inserts the given entities. Assumes the instance to be new to be able to apply insertion optimizations. Use the returned instance for further operations as the save operation might have changed the entity instance completely. Prefer using ReactiveCrudRepository.save(Object) instead to avoid the usage of store-specific API.
        Parameters:
        entities - must not be null.
        Returns:
        the saved entity