-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add @DocumentReference in posts of user
- Loading branch information
1 parent
374cbc2
commit e7450af
Showing
2 changed files
with
4 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,11 +38,7 @@ public void run(String... args) throws Exception { | |
User bob = new User(null, "Bob Grey", "[email protected]"); | ||
|
||
Flux<User> insertUsers = userRepository.saveAll(Arrays.asList(maria, alex, bob)); | ||
insertUsers.subscribe(); | ||
|
||
maria = userRepository.searchEmail("[email protected]").block(); | ||
alex = userRepository.searchEmail("[email protected]").block(); | ||
bob = userRepository.searchEmail("[email protected]").block(); | ||
insertUsers.subscribe(); | ||
|
||
Post post1 = new Post(null, Instant.parse("2022-11-21T18:35:24.00Z"), "Partiu viagem", | ||
"Vou viajar para São Paulo. Abraços!", maria.getId(), maria.getName()); | ||
|
@@ -62,7 +58,7 @@ public void run(String... args) throws Exception { | |
|
||
Mono<Void> deleteUser = userRepository.delete(maria); | ||
deleteUser.subscribe(); | ||
|
||
Mono<User> insertSingleUser = userRepository.save(maria); | ||
insertSingleUser.subscribe(); | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters