Skip to content

Commit

Permalink
Prepared release
Browse files Browse the repository at this point in the history
  • Loading branch information
JanHolger committed Nov 5, 2021
1 parent 5c5e5b5 commit 4b1a028
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/org/javawebstack/orm/Model.java
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public <T extends Model, P extends Model> Query<T> belongsToMany(Class<T> other,
Repo<?> selfRepo = Repo.get(getClass());
Repo<T> otherRepo = Repo.get(other);
Object id = selfRepo.getInfo().getField(selfFieldName).get(this);
return otherRepo.whereExists(pivot, q -> {
return otherRepo.query().whereExists(pivot, q -> {
q.where(pivot, selfPivotFieldName, "=", id).where(pivot, otherPivotFieldName, "=", other, otherFieldName);
if (pivotFilter != null)
q = pivotFilter.apply(q);
Expand Down

0 comments on commit 4b1a028

Please sign in to comment.