Skip to content

Commit

Permalink
feat: dto with association
Browse files Browse the repository at this point in the history
  • Loading branch information
sdelamo committed Jun 8, 2020
1 parent da8ce80 commit 8aca932
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ public PropertyProjection(@Nullable String entityAlias,

/**
*
* @return The type the projected property belongs to
* @return The alias of the entity the property belongs to.
*/
@Nullable
public String getEntityAlias() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ public abstract class AbstractPatternBasedMethod implements MethodCandidate {
private static final String DELETE = "delete";
private static final String UPDATE = "update";
private static final String VOID = "void";
private static final String ID = "id";
private static final Join.Type DEFAULT_JOIN_TYPE = Join.Type.FETCH;
protected final Pattern pattern;

Expand Down Expand Up @@ -205,10 +204,7 @@ protected MethodMatchInfo buildInfo(
return null;
}
}

// if (returnType.getSimpleName().equals("FaceDTO")) {
// applyJoinSpecifications(matchContext, query, matchContext.getRootEntity(), Arrays.asList(new JoinSpec("nose", "nose_", Join.Type.RIGHT_FETCH)));
// }

return new MethodMatchInfo(returnType, query, getInterceptorElement(matchContext, FindOneInterceptor.class), true);
} else {

Expand Down Expand Up @@ -521,7 +517,7 @@ private boolean attemptProjection(@NonNull MethodMatchContext matchContext,
.findFirst();
if (associationOptional.isPresent()) {
association = matchContext.getEntity(associationOptional.get().getType());
pp = association.getIdOrVersionPropertyByName(ID);
pp = association.getIdentity();
}
}

Expand Down

0 comments on commit 8aca932

Please sign in to comment.