I am afraid that you should add a CustomeId property within the Order class in order to achieve that goal. Otherwise the OpenAccessDataSource will be not able to retrieve the correct Customer instance per given Order instance, it will not prepare correct queries for the delete, insert and update operations neither.
You could add a new property to an existing persistent capable class by doing the following steps:
1. Select the class from the visual designer;
2. Right-click on the class and select the Add | Property option;
Now you should edit the association between the Customer and Order classes:
1. Select the association;
2. Open the Association editor
and configure the association using the Customer.CustomerId and Order.CustomerId properties;
3. Save the diagram;
You could find a sample application attached that uses the modified domain model.
Hope that helps. If any other questions arise, do not hesitate to contact us back.
the Telerik team
Q1’11 SP1 of Telerik OpenAccess is available for download
; also available is the Q2'11 Roadmap
for Telerik OpenAccess ORM.