In this example, the Customer and Invoice classes have been included in the view. The Customer class has an invoices property that is a collection. The Invoice class has a customer property.
The SQL statements in the following example access customer 123456.
SELECT * FROM Invoice, Customer WHERE Invoice.customer = Customer.oid AND Customer.code = '123456'