Skip to content

Commit

Permalink
WIP Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-Authored-By: Stéphane Épardaud <[email protected]>
  • Loading branch information
loicmathieu and FroMage authored Mar 17, 2020
1 parent 060da5c commit c53761a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions docs/src/main/asciidoc/hibernate-orm-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Person.delete("status", Status.Alive);
Person.deleteAll();
// delete by id
boolean deleted = Person.deleteByIf(personId);
boolean deleted = Person.deleteById(personId);
// update all living persons
Person.update("name = 'Moral' where status = ?1", Status.Alive);
Expand Down Expand Up @@ -383,7 +383,7 @@ personRepository.delete("status", Status.Alive);
personRepository.deleteAll();
// delete by id
boolean deleted = personRepository.deleteByIf(personId);
boolean deleted = personRepository.deleteById(personId);
// update all living persons
personRepository.update("name = 'Moral' where status = ?1", Status.Alive);
Expand Down
6 changes: 3 additions & 3 deletions docs/src/main/asciidoc/mongodb-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Person.delete("status", Status.Alive);
Person.deleteAll();
// delete by id
boolean deleted = Person.deleteByIf(personId);
boolean deleted = Person.deleteById(personId);
----

All `list` methods have equivalent `stream` versions.
Expand Down Expand Up @@ -383,7 +383,7 @@ personRepository.delete("status", Status.Alive);
personRepository.deleteAll();
// delete by id
boolean deleted = personRepository.deleteByIf(personId);
boolean deleted = personRepository.deleteById(personId);
----

All `list` methods have equivalent `stream` versions.
Expand Down Expand Up @@ -779,7 +779,7 @@ Uni<Long> deleteCount = ReactivePerson.delete("status", Status.Alive);
deleteCount = ReactivePerson.deleteAll();
// delete by id
Uni<Boolean> deleted = ReactivePerson.deleteByIf(personId);
Uni<Boolean> deleted = ReactivePerson.deleteById(personId);
----

TIP: If you use MongoDB with Panache in conjunction with RESTEasy, you can directly return a reactive type inside your JAX-RS resource endpoint as long as you include the `quarkus-resteasy-mutiny` extension.
Expand Down

0 comments on commit c53761a

Please sign in to comment.