I am not very familiar with QueryDSL, but the error is quite specific.
There is no constructor for which two float values ββare taken, which in your case come from:
JPAExpressions .select(paymentTransaction.amount) .from(paymentTransaction) .where(paymentTransaction.transactionId.eq(memberPayment.paymentTransaction.transactionId)) .fetchOne().floatValue()
and
JPAExpressions .select(paymentTransaction.amount) .from(paymentTransaction) .where(paymentTransaction.transactionId.eq(memberPayment.paymentTransaction.transactionId)) .fetchOne().floatValue()
The API http://www.querydsl.com/static/querydsl/4.0.5/apidocs/com/querydsl/core/types/Projections.html states that the possible use of Projections.constructor:
constructor(Class<? extends T> type, Expression<?>... exprs) Create a constructor invocation projection for the given type and expressions constructor(Class<? extends T> type, Class<?>[] paramTypes, com.google.common.collect.ImmutableList<Expression<?>> exprs) Create a constructor invocation projection for given type, parameter types and expressions constructor(Class<? extends T> type, Class<?>[] paramTypes, Expression<?>... exprs) Create a constructor invocation projection for given type, parameter types and expressions
which means that you are not making the call correctly. Read the documentation more carefully and look for examples, basically you abuse the API.
source share