Hibernate (Java)

Aus Tutorials
Zur Navigation springen Zur Suche springen

Hibernate 2

Sub Query

ExtendedDetachedCriteria voucherCriteria = ExtendedDetachedCriteria.forClass(DocumentParameters.class);
voucherCriteria.setProjection(Projections.property("targetVoucherType"));
voucherCriteria.add(Restrictions.eq("client", client));

ExtendedDetachedCriteria invoiceCriteria = ExtendedDetachedCriteria.forClass(IncomingInvoice.class);
invoiceCriteria.add(Subqueries.propertyIn("voucherType", voucherCriteria));

Hibernate 5

Links

https://howtodoinjava.com/hibernate/hibernate-jpa-2-persistence-annotations-tutorial


Zurück zu Java