numberOfThreads * numberOfNewCustomersPerThread * numberOfNewOrdersPerNewCustomer, nextOrderId);
// double check the orders to make sure they were updated correctly
Session session = sessionFactory.getSession();
QueryDomainType<OrderLine> queryOrderType = session.getQueryBuilder().createQueryDefinition(OrderLine.class);
queryOrderType.where(queryOrderType.get("orderId").equal(queryOrderType.param("orderId")));
Query<OrderLine> query = session.createQuery(queryOrderType);
for (Order order: orders) {
int orderId = order.getId();
// replace order with its persistent representation
order = session.find(Order.class, orderId);
double expectedTotal = order.getValue();