Skip Headers

# Using Java

Previous

Next

Query Optimization Using Batching

The following code example illustrates using batch for query optimization.

    // Queries on Employee are configured to always batch read Address
    OneToManyMapping phoneNumbersMapping = new OneToManyMapping();
    phoneNumbersMapping.setReferenceClass(" PhoneNumber.class")
    phoneNumbersMapping.setAttributeName("phones");
    phoneNumbersMapping.useBatchReading();
    phoneNumbersMapping.privateOwnedRelationship();