主键查询
<entity-one entity-name="CommunicationEvent" value-field="communicationEvent"/>
和关系的查询
<entity-and list="productStoreGroupRollups" entity-name="ProductStoreGroupRollup" filter-by-date="true">
<field-map field-name="productStoreGroupId" from-field="productStoreGroup.productStoreGroupId"/>
<field-map field-name="parentGroupId" from-field="parameters.primaryParentGroupId"/>
</entity-and>
复杂条件的查询
<now-timestamp field="nowTimestamp"/>
<set field="dayStart" value="${groovy: org.ofbiz.base.util.UtilDateTime.getDayStart(nowTimestamp)}" type="Timestamp"/>
<set field="dayEnd" value="${groovy: org.ofbiz.base.util.UtilDateTime.getDayEnd(nowTimestamp)}" type="Timestamp"/>
<!-- the facility must be Store the corresponding warehouse and has permission warehouse -->
<entity-condition entity-name="ProductStoreFacility" list="productStoreFacilities" >
<condition-list combine="and">
<condition-expr field-name="productStoreId" operator="equals" from-field="productStore.productStoreId"/>
<condition-expr field-name="fromDate" operator="less-equals" from-field="dayStart" />
<condition-list combine="or">
<condition-expr field-name="thruDate" operator="greater-equals" from-field="dayEnd" ignore-if-empty="true"/>
<condition-expr field-name="thruDate" operator="equals" from-field="nullField"/>
</condition-list>
</condition-list>
</entity-condition>