Aurelius ORM - Multiple classes on the same database table

Hi,

I have downloaded the Aurelius trial and after studying documentation a while , I would like to ask about a solution to the below case:

I have two tables Customer and Order, just ignore Order details for now.

What I have to do it seems straightforward to me, build 2 forms one (frmCustomer) for CRUD operations on Customer and another form (FrmOrder) for Crud operations on Orders.

Just for the example, there is only one business rule: no orders can be inserted without a customer.

In Aurelius I define one class TCustomer for Customer table and TOrder with an assosiation to TCustome for Order table.

Staying on the default model my question is, in which way can I define a new class to get Customer's Orders without modifying the already defined TCustomer and TOrder?

One solution I supposed will be a new TCustomerOrders = class(TCustomer) and a new association to the related TOrders, is that possible? Do I have to define TCustomerOrders as [Entity]? Can I have crud operation on that class through manager?

Thank you,
Theodor

I'm sorry but I didn't understand your question. Why can't you simply use TCustomer and TOrder? The associations between both must be added to those classes as well.

Thanks for your answer, I know that I can build all relations of a Customer in one class.
TCustomer joined with Orders,Invoices, Payments, phones, address, cash balance etc, but in a crud operation like a simple insert or update or retrieve a customer code or name I don't need all these associations to be part of it.
Even worst I dont want a simple SQL query for customer name and code be toogether with many joins to unesseary tables, this is my concern.
I thought you can have, as in SQL many "views" with the same base table, many classes with the same base table.

I give you one more example for better understanding: In a traditional c/s app we can make different queries with the same table in different Datasets, for example : Dataset1 for Order = Select * from orders left outer join customers , Dataset2 for Customer = select * from customer, Dataset3 for CustomerOrders = Select Customer.*, OrderNum from Customers join Order ... can you "convert" this approach using classes instead of datasets?

Aurelius has the concept of lazy-loading which is used to control whether the associations must be retrieved together with the "parent" object or not: