Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
571 B
2
Indexable
Never
JPAQueryFactory queryFactory = new JPAQueryFactory(entityManager);
Qe120Ped qPedido = Qe120Ped.e120Ped;
Qe120Ipd qIpd = Qe120Ipd.e120Ipd;
QE075der qE075der = QE075der.e075der;
QE075derImage qE075derImage = QE075derImage.e075derImage;

List<E075derImage> resultado = queryFactory
    .select(qE075derImage)
    .from(qPedido)
    .join(qPedido.e120ipdList, qIpd)
    .join(qIpd.e075der, qE075der)
    .join(qE075der.e075derImage, qE075derImage)
    .where(qE075der.id.eq(qE075derImage.id)
        .and(qPedido.id.eq(pedidoId)))
    .distinct()
    .fetch();