Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect object type Mono findById #16603

Merged
merged 3 commits into from
Oct 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const <%= entityInstance %>Route: Routes = [
component: <%= entityAngularName %>Component,
<%_ if (paginationPagination) { _%>
data: {
defaultSort: 'id,asc',
defaultSort: '<%- primaryKey.name %>,asc',
},
<%_ } _%>
canActivate: [UserRouteAccessService]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,13 @@ _%>

@Override
public Mono<<%= persistClass %>> findById(<%= primaryKey.type %> id) {
return createQuery(null, where("id").is(id)).one();
return createQuery(null, where("<%= primaryKey.name %>").is(id)).one();
}

<%_ if (fieldsContainOwnerManyToMany) { _%>

@Override
public Mono<<%= persistClass %>> findOneWithEagerRelationships(Long id) {
public Mono<<%= persistClass %>> findOneWithEagerRelationships(<%= primaryKey.type %> id) {
return findById(id);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ if (databaseTypeSql) {
Flux<<%= persistClass %>> findAllWithEagerRelationships(Pageable page);

@Override
Mono<Void> deleteById(Long id);
Mono<Void> deleteById(<%= primaryKey.type %> id);

<%_ } _%>

Expand Down Expand Up @@ -138,7 +138,7 @@ if (databaseTypeSql) {
Flux<<%= persistClass %>> findAll();

@Override
Mono<<%= persistClass %>> findById(Long id);
Mono<<%= persistClass %>> findById(<%= primaryKey.type %> id);

@Override
<S extends <%= persistClass %>> Mono<S> save(S entity);
Expand All @@ -165,7 +165,7 @@ interface <%= entityClass %>RepositoryInternal {

Flux<<%= persistClass %>> findAllWithEagerRelationships(Pageable page);

Mono<Void> deleteById(Long id);
Mono<Void> deleteById(<%= primaryKey.type %> id);
<%_ } _%>

}
Expand Down