fix formatting and condition for jpaConstant generation