Hibernate (Java): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(Die Seite wurde neu angelegt: „ Zurück zu Java“) |
|||
Zeile 1: | Zeile 1: | ||
== Sub Query == | |||
<pre> | |||
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)); | |||
</pre> | |||
Zurück zu [[Java#Frameworks|Java]] | Zurück zu [[Java#Frameworks|Java]] |
Version vom 23. März 2018, 13:43 Uhr
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));
Zurück zu Java