You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can I convert JpaRepository Query to ReactiveMongoRepository Query
public interface BlogRepository extends JpaRepository<Blog, Long> {
@Query("select blog from Blog blog where blog.user.login = ?#{principal.username}")
List<Blog> findByUserIsCurrentUser();
}
public class Job implements Serializable {
private static final long serialVersionUID = 1L;
@Id
private String id;
@NotNull(message = "must not be null")
@Field("prompt")
private String prompt;
@NotNull(message = "must not be null")
@Field("status")
private JobStatus status;
@Field("user")
private User user;
...
I want just list SecurityUtils.getCurrentUserLogin() jobs
@GetMapping(value = "/jobs", produces = MediaType.APPLICATION_JSON_VALUE)
public Mono<List<Job>> getAllJobs(@RequestParam(required = false, defaultValue = "false") boolean eagerload) {
log.debug("REST request to get all Jobs");
if (eagerload) {
// return jobRepository.findByUserIsCurrentUser().collectList(); ???
return jobRepository.findAllWithEagerRelationships().collectList();
} else {
return jobRepository.findAll().collectList();
}
}
The text was updated successfully, but these errors were encountered:
Hi I am new 👋 leaning jhipster and spring
thanks for the example https://github.com/mraible/jhipster6-demo#add-business-logic
How can I convert JpaRepository Query to ReactiveMongoRepository Query
I tried this but not worked
Job class
I want just list SecurityUtils.getCurrentUserLogin() jobs
The text was updated successfully, but these errors were encountered: